package com.yida.data.common.core.entity.userLeave;

import com.yida.data.common.core.entity.user.EduStaff;
import java.util.Date;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.time.LocalDate;
import java.time.LocalTime;

/**
 * Entity
 *
 * @author wjm
 * @date 2022-12-01 10:45:56
 */
@Data
@TableName("edu_leave_request_process_record")
public class EduLeaveRequestProcessRecord {

    /**
     *
     */
    @ApiModelProperty(value = "")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 流程ID
     */
    @ApiModelProperty(value = "流程ID")
    @TableField("process_id")
    private Long processId;

    /**
     * 请假主体ID
     */
    @ApiModelProperty(value = "请假主体ID")
    @TableField("request_id")
    private Long requestId;

    /**
     * 审核人ID
     */
    @ApiModelProperty(value = "审核人ID")
    @TableField("approval_id")
    private Long approvalId;

    /**
     * 审核人姓名，记录方便展示
     */
    @ApiModelProperty(value = "审核人姓名，记录方便展示")
    @TableField("approval_name")
    private String approvalName;

    /**
     * 审核人ID
     */
    @ApiModelProperty(value = "审核人信息")
    private transient EduStaff approvaler;

    /**
     * 审核结果：2=审核不通过,1=通过，0=待审核，默认0
     */
    @ApiModelProperty(value = "审核结果：2=审核不通过,1=通过，0=待审核，默认0")
    @TableField("approval_result")
    private Integer approvalResult;

    /**
     * 审核不通过的原因
     */
    @ApiModelProperty(value = "审核不通过的原因")
    @TableField("approval_reason")
    private String approvalReason;

    /**
     * 学校id
     */
    @ApiModelProperty(value = "学校id")
    @TableField("school_id")
    private Long schoolId;

    /**
     * 审核顺序
     */
    @ApiModelProperty(value = "审核顺序")
    @TableField("sort")
    private Integer sort;


    /**
     * 审核顺序
     */
    @ApiModelProperty(value = "审核第几流程ID")
    @TableField("view_id")
    private Long viewId;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_date", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDate;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @TableField(value = "create_id", fill = FieldFill.INSERT)
    private Long createId;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    @TableField(value = "update_date", fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDate;

    /**
     * 修改人
     */
    @ApiModelProperty(value = "修改人")
    @TableField(value = "update_id", fill = FieldFill.UPDATE)
    private Long updateId;

    /**
     * 0为未删除，1为已删除
     */
    @ApiModelProperty(value = "0为未删除，1为已删除")
    @TableField("del_flag")
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;

}