
package org.sky.scientific.pojo.entity;

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_attendance_records")
@Schema(description = "研发人员考勤表")
@EqualsAndHashCode(callSuper = true)
public class AttendanceEntity extends TenantEntity {

	@Serial
	private static final long serialVersionUID = 1L;

	@Schema(description = "研发人员唯一标识")
	@NotBlank(message = "unicode不能为空")
	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;

}
