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

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

import java.math.BigDecimal;

@TableName("devops_form_model")
@Data
@EqualsAndHashCode(callSuper = true)
public class FormModel extends BaseBusinessEntity {

    @TableId(value = "form_model_id", type = IdType.ASSIGN_ID)
    @ChineseDescription("模型id")
    private Long formModelId;

    @TableField("business_category_id")
    @ChineseDescription("所属业务分类id")
    private Long businessCategoryId;

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

    @TableField("form_model_name")
    @ChineseDescription("模型名称")
    private String formModelName;

    @TableField("form_model_code")
    @ChineseDescription("模型编码")
    private String formModelCode;

    @TableField("system_code")
    @ChineseDescription("系统编码，这里用十进制存储，但是展示的时候是3位36进制的字符串")
    private Integer systemCode;

    @TableField("system_code_show")
    @ChineseDescription("系统编码，用于展示")
    private String systemCodeShow;

    @TableField("current_version")
    @ChineseDescription("当前版本号，默认1.0")
    private String currentVersion;

    @TableField("current_definition_id")
    @ChineseDescription("当前的模型定义id")
    private Long currentDefinitionId;

    @TableField("description")
    @ChineseDescription("项目描述")
    private String description;

    @TableField("flow_flag")
    @ChineseDescription("是否是流程表单：Y-是，N-否")
    private String flowFlag;

    @TableField("fld_sort")
    @ChineseDescription("排序")
    private BigDecimal fldSort;

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

}
