package com.xueyi.system.staff.domain.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.xueyi.common.core.annotation.Excel;
import com.xueyi.common.core.web.tenant.base.TBaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.util.Date;

import static com.xueyi.common.core.constant.basic.EntityConstants.NAME;
import static com.xueyi.common.core.constant.basic.EntityConstants.REMARK;
import static com.xueyi.common.core.constant.basic.EntityConstants.SORT;
import static com.xueyi.common.core.constant.basic.EntityConstants.STATUS;

/**
 * 员工考勤 持久化对象
 *
 * @author xueyi
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "dm_emp_attendance", excludeProperty = { STATUS, SORT, REMARK, NAME })
public class DmEmpAttendancePo extends TBaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    /** 人员名 */
    @Excel(name = "人员名", sort = 3)
    protected String userName;

    /** 人员ID */
    @Excel(name = "人员ID", sort = 2)
    protected Long userId;

    /** 人员类型 */
    @Excel(name = "人员类型", readConverterExp = "5=员工,4=高管", sort = 4)
    protected Long userType;

    /** 当日最早打卡记录 */

    protected Date checkInTime;

    /** 当日最晚打卡记录 */

    protected Date checkOutTime;

    /** 工作时长（分钟） */
    @Excel(name = "工作时长", readConverterExp = "分=钟", sort = 8)
    protected Integer workDuration;

    /** 所属组织ID */
    protected Long deptId;

    @Excel(name = "日期", sort = 1)
    private String dateStr;

}