package cn.stylefeng.workflow.instance.modular.auth.entity;

import cn.stylefeng.roses.kernel.db.api.pojo.entity.BaseEntity;
import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

@TableName("flow_auth")
@Data
@EqualsAndHashCode(callSuper = true)
public class FlowAuth extends BaseEntity {

    @TableId(value = "flow_auth_id", type = IdType.ASSIGN_ID)
    @ChineseDescription("主键")
    private Long flowAuthId;

    @TableField("flow_model_id")
    @ChineseDescription("关联的流程模型id")
    private Long flowModelId;

    @TableField("link_type")
    @ChineseDescription("关联类型：0-全部，10-机构，20-人员，30-角色")
    private Integer linkType;

    @TableField("business_id")
    @ChineseDescription("业务id，例如：如果是10就是机构id")
    private Long businessId;

    @TableField(value = "tenant_id", fill = FieldFill.INSERT)
    @ChineseDescription("租户id")
    private Long tenantId;

    @TableField(exist = false)
    @ChineseDescription("流程模型名称")
    private String flowModelName;

    @TableField(exist = false)
    @ChineseDescription("业务名称")
    private String businessName;


}
