package com.qmth.sop.business.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.sop.common.base.BaseEntity;
import com.qmth.sop.common.contant.SystemConstant;
import com.qmth.sop.common.enums.DingDateTypeEnum;
import com.qmth.sop.common.enums.RoleTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * <p>
 * 考勤打卡表
 * </p>
 *
 * @author wangliang
 * @since 2023-08-01
 */
@ApiModel(value = "TBDing对象", description = "考勤打卡表")
public class TBDing extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "sop单号")
    private String sopNo;

    @ApiModelProperty(value = "sop单号(实际打卡)")
    private String dingSopNo;

    @ApiModelProperty(value = "crm单号")
    private String crmNo;

    @ApiModelProperty(value = "服务单元id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long serviceId;

    @ApiModelProperty(value = "用户档案id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userArchivesId;

    @ApiModelProperty("角色类型")
    private RoleTypeEnum roleType;

    @ApiModelProperty(value = "用户id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    @ApiModelProperty(value = "流程id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long flowId;

    @ApiModelProperty(value = "流程任务id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long taskId;

    @ApiModelProperty(value = "签到年份")
    private String signYear;

    @ApiModelProperty(value = "签到日期")
    private String signDate;

    @ApiModelProperty(value = "日期类型：WEEKDAY(工作日),WEEKEND(周末),LEGAL_HOLIDAYS(法定节假日)")
    private DingDateTypeEnum dateType;

    @ApiModelProperty(value = "签到时间")
    private Long signInTime;

    @ApiModelProperty(value = "签到地址")
    private String signInAddress;

    @ApiModelProperty(value = "坐标轴X")
    private String axisInX;

    @ApiModelProperty(value = "坐标轴Y")
    private String axisInY;

    @ApiModelProperty(value = "人脸识别是否通过，0：未通过，1：通过")
    private Boolean faceInPass;

    @ApiModelProperty(value = "签退时间")
    private Long signOutTime;

    @ApiModelProperty(value = "签退地址")
    private String signOutAddress;

    @ApiModelProperty(value = "坐标轴X")
    private String axisOutX;

    @ApiModelProperty(value = "坐标轴Y")
    private String axisOutY;

    @ApiModelProperty(value = "人脸识别是否通过，0：未通过，1：通过")
    private Boolean faceOutPass;

    public TBDing() {

    }

    public TBDing(String sopNo, String crmNo, Long serviceId, Long userArchivesId, RoleTypeEnum roleType, Long userId, Long flowId) {
        setId(SystemConstant.getDbUuid());
        this.sopNo = sopNo;
        this.dingSopNo = sopNo;
        this.crmNo = crmNo;
        this.serviceId = serviceId;
        this.userArchivesId = userArchivesId;
        this.roleType = roleType;
        this.userId = userId;
        this.flowId = flowId;
        setCreateId(userId);
        setCreateTime(System.currentTimeMillis());
    }

    public String getSopNo() {
        return sopNo;
    }

    public void setSopNo(String sopNo) {
        this.sopNo = sopNo;
    }

    public String getDingSopNo() {
        return dingSopNo;
    }

    public void setDingSopNo(String dingSopNo) {
        this.dingSopNo = dingSopNo;
    }

    public String getCrmNo() {
        return crmNo;
    }

    public void setCrmNo(String crmNo) {
        this.crmNo = crmNo;
    }

    public Long getServiceId() {
        return serviceId;
    }

    public void setServiceId(Long serviceId) {
        this.serviceId = serviceId;
    }

    public Long getUserArchivesId() {
        return userArchivesId;
    }

    public void setUserArchivesId(Long userArchivesId) {
        this.userArchivesId = userArchivesId;
    }

    public RoleTypeEnum getRoleType() {
        return roleType;
    }

    public void setRoleType(RoleTypeEnum roleType) {
        this.roleType = roleType;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getFlowId() {
        return flowId;
    }

    public void setFlowId(Long flowId) {
        this.flowId = flowId;
    }

    public Long getTaskId() {
        return taskId;
    }

    public void setTaskId(Long taskId) {
        this.taskId = taskId;
    }

    public String getSignYear() {
        return signYear;
    }

    public void setSignYear(String signYear) {
        this.signYear = signYear;
    }

    public String getSignDate() {
        return signDate;
    }

    public void setSignDate(String signDate) {
        this.signDate = signDate;
    }

    public DingDateTypeEnum getDateType() {
        return dateType;
    }

    public void setDateType(DingDateTypeEnum dateType) {
        this.dateType = dateType;
    }

    public Long getSignInTime() {
        return signInTime;
    }

    public void setSignInTime(Long signInTime) {
        this.signInTime = signInTime;
    }

    public String getSignInAddress() {
        return signInAddress;
    }

    public void setSignInAddress(String signInAddress) {
        this.signInAddress = signInAddress;
    }

    public String getAxisInX() {
        return axisInX;
    }

    public void setAxisInX(String axisInX) {
        this.axisInX = axisInX;
    }

    public String getAxisInY() {
        return axisInY;
    }

    public void setAxisInY(String axisInY) {
        this.axisInY = axisInY;
    }

    public Boolean getFaceInPass() {
        return faceInPass;
    }

    public void setFaceInPass(Boolean faceInPass) {
        this.faceInPass = faceInPass;
    }

    public Long getSignOutTime() {
        return signOutTime;
    }

    public void setSignOutTime(Long signOutTime) {
        this.signOutTime = signOutTime;
    }

    public String getSignOutAddress() {
        return signOutAddress;
    }

    public void setSignOutAddress(String signOutAddress) {
        this.signOutAddress = signOutAddress;
    }

    public String getAxisOutX() {
        return axisOutX;
    }

    public void setAxisOutX(String axisOutX) {
        this.axisOutX = axisOutX;
    }

    public String getAxisOutY() {
        return axisOutY;
    }

    public void setAxisOutY(String axisOutY) {
        this.axisOutY = axisOutY;
    }

    public Boolean getFaceOutPass() {
        return faceOutPass;
    }

    public void setFaceOutPass(Boolean faceOutPass) {
        this.faceOutPass = faceOutPass;
    }
}
