package cn.com.oa.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@TableName("bpm_flow_instance")
@Data
public class FlowInstance {
    /**
     * 流程实例id
     */
    @TableId(value = "l_ins_id")
    private Long insId;
    /**
     * 流程实例名称
     */
    @TableField(value = "v_ins_name")
    private String insName;
    /**
     * 流程实例备注
     */
    @TableField(value = "v_ins_remark")
    private String insRemark;
    /**
     * 流程模版id
     */
    @TableField(value = "l_model_id")
    private Long modelId;
    /**
     * 流程实例状态
     */
    @TableField(value = "n_state")
    private Integer state;
    /**
     * 流程启动人id
     */
    @TableField(value = "v_creator")
    private String creator;
    /**
     * 流程启动时间
     */
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @TableField(value = "d_createdate")
    private Date createdate;
    /**
     * 流程撤销时间
     */
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @TableField(value = "d_canceldate")
    private Date canceldate;
    /**
     * 流程结束时间
     */
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @TableField(value = "d_finishdate")
    private Date finishdate;
    /**
     * 流程表单id
     */
    @TableField(value = "l_form_ins_id")
    private Long formInsId;
    /**
     * 流程表单模版id
     */
    @TableField(value = "l_form_id")
    private Long formId;
    /**
     * 流程启动人部门id
     */
    @TableField(value = "l_groupid")
    private Long groupid;
    /**
     * 流程控制方式
     */
    @TableField(value = "n_control")
    private String control;

   /* *//**
     * 流程模版所属部门
     *//*
    @TableField(exist = false)
    private String dept;*/
}
