package cn.stylefeng.team.project.api.entity;

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

@TableName("devops_business_permission")
@Data
@EqualsAndHashCode(callSuper = true)
public class BusinessPermission extends BaseEntity {

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

    @TableField("business_id")
    @ChineseDescription("所属业务id")
    private Long businessId;

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

    @TableField("link_business_id")
    @ChineseDescription("关联业务id，例如：如果是10就是机构id")
    private Long linkBusinessId;

    @TableField("scope_type")
    @ChineseDescription("范围类型：1-指定范围，2-指定部门及以下")
    private Integer scopeType;

    @TableField("operate_type")
    @ChineseDescription("操作权限：1-填报，2-管理，3-全部")
    private Integer operateType;

    @TableField(exist = false)
    @ChineseDescription("关联的业务名称，为人名或者部门名称")
    private String linkBusinessName;

}