package cn.iocoder.yudao.module.system.dal.dataobject.laborcontract;

import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.module.system.controller.admin.laborcontract.vo.UploadFile;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.*;

import java.time.LocalDate;
import java.util.List;

/**
 * 劳动合同管理 DO
 *
 * @author 符溶馨
 */
@TableName(value = "system_labor_contract", autoResultMap = true)
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class LaborContractDO extends BaseDO {

    /**
     * 状态  0待签 1过期 2已签 3离职
     */
    public static final Integer STATUS_WAIT_SIGN = 0;
    public static final Integer STATUS_EXPIRE = 1;
    public static final Integer STATUS_SIGN = 2;
    public static final Integer STATUS_LEAVE = 3;

    /**
     * id
     */
    @TableId
    private Long id;
    /**
     * 用户id
     */
    private Long userId;
    /**
     * 部门id
     */
    private Long deptId;
    /**
     * 签约日期
     */
    private LocalDate signingDate;
    /**
     * 到期日期
     */
    private LocalDate expirationDate;
    /**
     * 签约年限
     */
    private Integer contractDuration;
    /**
     * 试用期限
     */
    private Integer probationPeriodTime;
    /**
     * 状态  0待签 1过期 2已签 3离职
     */
    private Integer status;
    /**
     * 附件基本信息
     */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<UploadFile> fileItems;
}