package cn.palmte.work.model;

import lombok.Data;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

/**
 * 项目审批任务记录
 */
@Data
@Entity
@Table(name = "project_task_record")
public class ProjectTaskRecord {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;

    @Column(name = "project_id")
    private int projectId;

    @Column(name = "proc_def_id")
    private String procDefId;

    @Column(name = "proc_ins_id")
    private String procInsId;

    @Column(name = "task_def_key")
    private String taskDefKey;

    @Column(name = "task_name")
    private String taskName;

    /**
     * @see cn.palmte.work.bean.ApproveStatusEnum#approveStatus
     */
    @Column(name = "task_status")
    private int taskStatus;

    /**
     * 审批人id
     */
    @Column(name = "assignee_id")
    private String assigneeId;

    /**
     * 审批人姓名
     */
    @Column(name = "assignee_name")
    private String assigneeName;

    /**
     * 审批意见
     */
    @Column(name = "task_comment")
    private String taskComment;

    @Column(name = "create_time")
    private Date createTime;

    @Transient
    private String roleName;

    /**
     * 任务节点位置  -1结束节点  0-未知或者其他节点  1-开始节点   2-发起审批节点
     */
    @Column(name = "task_index")
    private int taskIndex;

    /**
     * 会签单文件访问地址
     */
    @Column(name = "file_url")
    private String fileUrl;

}
