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

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

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

import com.publiccms.common.database.CmsUpgrader;
import com.publiccms.common.generator.annotation.GeneratorColumn;

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

    private static final long serialVersionUID = 1L;
    /**
     * id
     */
    @GeneratorColumn(title = "ID")
    private Long id;
    /**
     * workflow
     * <p>
     * 流程
     */
    @GeneratorColumn(title = "流程", condition = true)
    private int workflowId;
    /**
     * name
     * 名称
     */
    @GeneratorColumn(title = "名称")
    @NotNull
    @Length(max = 50)
    private String name;
    /**
     * role
     * <p>
     * 角色
     */
    @GeneratorColumn(title = "角色")
    private Integer roleId;
    /**
     * dept
     * <p>
     * 部门
     */
    @GeneratorColumn(title = "部门")
    private Integer deptId;
    /**
     * user
     * <p>
     * 用户
     */
    @GeneratorColumn(title = "人员")
    private Long userId;
    /**
     * 使用创建用户
     * <p>
     * use create user
     */
    @GeneratorColumn(title = "使用创建用户")
    private boolean useCreateUser;
    /**
     * next step
     * <p>
     * 下一步
     */
    @GeneratorColumn(title = "下一步")
    private Long nextStepId;
    /**
     * sort
     * <p>
     * 排序
     */
    @GeneratorColumn(title = "排序", order = true)
    private int sort;

    public SysWorkflowStep() {
    }

    public SysWorkflowStep(int workflowId, String name, boolean useCreateUser, int sort) {
        this.workflowId = workflowId;
        this.name = name;
        this.useCreateUser = useCreateUser;
        this.sort = sort;
    }

    public SysWorkflowStep(int workflowId, String name, Integer roleId, Integer deptId, Long userId, boolean useCreateUser, Long nextStepId, int sort) {
        this.workflowId = workflowId;
        this.name = name;
        this.roleId = roleId;
        this.deptId = deptId;
        this.userId = userId;
        this.useCreateUser = useCreateUser;
        this.nextStepId = nextStepId;
        this.sort = sort;
    }

    @Id
    @GeneratedValue(generator = "cmsGenerator")
    @GenericGenerator(name = "cmsGenerator", strategy = CmsUpgrader.IDENTIFIER_GENERATOR)
    @Column(name = "id", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }

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

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

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

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

    public void setName(String name) {
        this.name = name;
    }

    @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 = "use_create_user", nullable = false)
    public boolean isUseCreateUser() {
        return this.useCreateUser;
    }

    public void setUseCreateUser(boolean useCreateUser) {
        this.useCreateUser = useCreateUser;
    }
    
    @Column(name = "next_step_id")
    public Long getNextStepId() {
        return this.nextStepId;
    }

    public void setNextStepId(Long nextStepId) {
        this.nextStepId = nextStepId;
    }

    @Column(name = "sort", nullable = false)
    public int getSort() {
        return this.sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }
}
