package com.ruoyi.oa.domain.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 人员考勤业务对象 sys_oa_attendance
 *
 * @author hdka
 * @date 2024-11-05
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class SysOaAttendanceBo extends BaseEntity {

    /**
     * 主键id
     */
    private Long id;

    /**
     * 员工id
     */
    private Long userId;

    /**
     * 签到日
     */
    @NotNull(message = "签到日不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long attendanceDay;

    /**
     * 项目id
     */
    @NotNull(message = "项目id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long projectId;

    /**
     * 时长（天）1|0.5
     */
    private Double dayLength;

    /**
     * 时长（小时）
     */
    private Double hour;

    /**
     * 备注
     */
    private String remark;

    /**
     * 查询月份
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date selectTime;


}
