package com.publiccms.entities.sys;
// Generated 2023-8-7 21:42:23 by Hibernate Tools 5.6.15.Final

import java.util.Date;

import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.validator.constraints.Length;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.publiccms.common.generator.annotation.GeneratorColumn;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import jakarta.validation.constraints.NotBlank;

/**
 * SysWorkflowProcess generated by hbm2java
 */
@Entity
@Table(name = "sys_workflow_process")
@DynamicUpdate
public class SysWorkflowProcess implements java.io.Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * id
     */
    @GeneratorColumn(title = "ID")
    private Long id;
    @GeneratorColumn(title = "站点", condition = true)
    @JsonIgnore
    private short siteId;
    /**
     * workflow
     * <p>
     * 流程
     */
    @GeneratorColumn(title = "流程")
    private int workflowId;
    /**
     * title
     * 
     * 标题
     */
    @GeneratorColumn(title = "标题", condition = true, like = true, or = true)
    @NotBlank
    @Length(max = 255)
    private String title;
    /**
     * item type
     * <p>
     * 项目类型
     */
    @GeneratorColumn(title = "项目类型", condition = true)
    private String itemType;
    /**
     * item id
     * <p>
     * 项目id
     */
    @GeneratorColumn(title = "项目", condition = true)
    private String itemId;
    /**
     * step
     * <p>
     * 步骤
     */
    @GeneratorColumn(title = "步骤")
    private long stepId;
    /**
     * role
     * <p>
     * 角色
     */
    @GeneratorColumn(title = "角色", condition = true)
    private Integer roleId;
    /**
     * dept
     * <p>
     * 部门
     */
    @GeneratorColumn(title = "部门", condition = true)
    private Integer deptId;
    /**
     * user
     * <p>
     * 用户
     */
    @GeneratorColumn(title = "人员", condition = true)
    private Long userId;
    /**
     * closed
     * <p>
     * 已关闭
     */
    @GeneratorColumn(title = "关闭", condition = true)
    private boolean closed;
    /**
     * create user
     * <p>
     * 创建用户
     */
    @GeneratorColumn(title = "创建用户")
    private long createUserId;
    /**
     * create date
     * <p>
     * 创建日期
     */
    @GeneratorColumn(title = "创建日期")
    private Date createDate;
    /**
     * update date
     * 
     * 更新日期
     */
    @GeneratorColumn(title = "更新日期")
    private Date updateDate;

    public SysWorkflowProcess() {
    }

    public SysWorkflowProcess(short siteId, int workflowId, String title, String itemType, String itemId, long stepId,
            boolean closed, long createUserId, Date createDate) {
        this.siteId = siteId;
        this.workflowId = workflowId;
        this.title = title;
        this.itemType = itemType;
        this.itemId = itemId;
        this.stepId = stepId;
        this.closed = closed;
        this.createUserId = createUserId;
        this.createDate = createDate;
    }

    public SysWorkflowProcess(short siteId, int workflowId, String title, String itemType, String itemId, long stepId,
            Integer roleId, Integer deptId, Long userId, boolean closed, long createUserId, Date createDate, Date updateDate) {
        this.siteId = siteId;
        this.workflowId = workflowId;
        this.title = title;
        this.itemType = itemType;
        this.itemId = itemId;
        this.stepId = stepId;
        this.roleId = roleId;
        this.deptId = deptId;
        this.userId = userId;
        this.closed = closed;
        this.createUserId = createUserId;
        this.createDate = createDate;
        this.updateDate = updateDate;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "site_id", nullable = false)
    public short getSiteId() {
        return this.siteId;
    }

    @Column(name = "workflow_id", nullable = false)
    public int getWorkflowId() {
        return this.workflowId;
    }

    public void setWorkflowId(int workflowId) {
        this.workflowId = workflowId;
    }

    @Column(name = "title", nullable = false)
    public String getTitle() {
        return this.title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setSiteId(short siteId) {
        this.siteId = siteId;
    }

    @Column(name = "item_type", nullable = false, length = 50)
    public String getItemType() {
        return this.itemType;
    }

    public void setItemType(String itemType) {
        this.itemType = itemType;
    }

    @Column(name = "item_id", nullable = false, length = 100)
    public String getItemId() {
        return this.itemId;
    }

    public void setItemId(String itemId) {
        this.itemId = itemId;
    }

    @Column(name = "step_id", nullable = false)
    public long getStepId() {
        return this.stepId;
    }

    public void setStepId(long stepId) {
        this.stepId = stepId;
    }

    @Column(name = "role_id")
    public Integer getRoleId() {
        return this.roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    @Column(name = "dept_id")
    public Integer getDeptId() {
        return this.deptId;
    }

    public void setDeptId(Integer deptId) {
        this.deptId = deptId;
    }

    @Column(name = "user_id")
    public Long getUserId() {
        return this.userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    @Column(name = "closed", nullable = false)
    public boolean isClosed() {
        return this.closed;
    }

    public void setClosed(boolean closed) {
        this.closed = closed;
    }
    

    @Column(name = "create_user_id", nullable = false)
    public long getCreateUserId() {
        return this.createUserId;
    }

    public void setCreateUserId(long createUserId) {
        this.createUserId = createUserId;
    }

    @Column(name = "create_date", nullable = false, length = 19)
    public Date getCreateDate() {
        return this.createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Column(name = "update_date", length = 19)
    public Date getUpdateDate() {
        return this.updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }
}
