
package org.sky.scientific.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.sky.core.tenant.mp.TenantEntity;

import java.io.Serial;

/**
 * 研发人员研发工时记录表 实体类
 *
 * @author Kd
 * @since 2025-06-29
 */
@Data
@TableName("kd_xm_technician_hours")
@Schema(description = "研发人员研发工时记录表")
@EqualsAndHashCode(callSuper = true)
public class XmTechnicianHours extends TenantEntity {

	@Serial
	private static final long serialVersionUID = 1L;

	@Schema(description = "所属年月")
	@TableField(exist = false)
	private String yearAndMonth;

	@Schema(description = "研发项目id")
	@NotBlank(message = "请选择研发项目")
	private Long xmId;

	@Schema(description = "科研人员唯一标识")
	@NotBlank(message = "请选择研发人员")
	private String unicode;

	@Schema(description="日期,yyyyMMdd")
	@NotNull(message = "请选择出工日期")
	private String workDate;

	@Schema(description="工时（小时）")
	@NotNull(message = "请填写工时（小时）")
	@Min(value = 0, message = "请填写正确的工时（小时）")
	@Max(value = 24, message = "请填写正确的工时（小时）")
	private Double workHours;
}
