/*
 * Author: wangjian
 * 生成entity
 */
package com.tofly.qualitycontrol.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;


/**
 * 质量工单审核记录表
 *
 * @author admin
 * @date Mon Jun 13 00:00:00 CST 2022
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "TF_YWPN_MASSAUDIT_W", resultMap = "massauditMap")
@KeySequence("TF_YWPN_MASSAUDIT_W")
@ApiModel
@Accessors(chain = true)
public class Massaudit extends Model<Massaudit> {
    private static final long serialVersionUID = 1L;

    /**
     * $column.comments
     */
    @TableId(value = "ID", type = IdType.INPUT)
    @ApiModelProperty(value = "$column.comments")
    private Long id;
    /**
     * 审核顺序
     */
    @ApiModelProperty(value = "审核顺序")
    private Long num;
    /**
     * 工单编号
     */
    @ApiModelProperty(value = "工单编号")
    private String code;
    /**
     * 所属流程 0 整改下达  1 整改审核
     */
    @ApiModelProperty(value = "所属流程 0 整改下达  1 整改审核")
    private Long process;
    /**
     * 审核结果 0 拒绝 1 通过
     */
    @ApiModelProperty(value = "审核结果 0 未审核 1 驳回  2 通过")
    private Long auditState;
    /**
     * 审核发起人
     */
    @ApiModelProperty(value = "审核发起人")
    private Long initiator;
    /**
     * 审核人
     */
    @ApiModelProperty(value = "审核人")
    private Long auditUser;

    @ApiModelProperty(value = "审核部门")
    private Long auditDept;
    /**
     * 审核意见
     */
    @ApiModelProperty(value = "审核意见")
    private String msg;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "文件id")
    private String fileIds;

    @ApiModelProperty(value = "父级id，如果不为空代表已经驳回到检验记录，重新生成审批流程")
    private Long parentId;

    /*不是数据库字段*/
    /**
     * 审核人姓名
     */
    @TableField(exist = false)
    private String initiatorName;
    /**
     * 审核人姓名
     */
    @TableField(exist = false)
    private String auditUserName;
    /**
     * 流程名称
     */
    @TableField(exist = false)
    private String processName;
    /**
     * 审核状态名
     */
    @TableField(exist = false)
    private String auditStateName;
    /**
     * 审核部门
     */
    @TableField(exist = false)
    private String auditDeptName;
    @TableField(exist = false)
    private List<String> filePaths;

}
