package cn.stylefeng.team.project.modular.business.pojo.request;

import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest;
import cn.stylefeng.team.project.api.entity.BusinessPermission;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
public class BusinessRequest extends BaseRequest {

    @NotNull(message = "业务id不能为空", groups = {edit.class, delete.class, detail.class})
    @ChineseDescription("业务id")
    private Long businessId;

    @NotNull(message = "业务所属分类id不能为空", groups = {add.class, edit.class})
    @ChineseDescription("业务所属分类id")
    private Long businessCategoryId;

    @NotBlank(message = "业务名称不能为空", groups = {add.class, edit.class})
    @ChineseDescription("业务名称")
    private String businessName;

    @NotBlank(message = "业务编码不能为空", groups = {add.class, edit.class})
    @ChineseDescription("业务编码")
    private String businessCode;

    @NotNull(message = "系统编码，这里用十进制存储不能为空", groups = {add.class})
    @ChineseDescription("系统编码，这里用十进制存储")
    private Integer systemCode;

    @NotBlank(message = "系统编码，用于展示，展示的时候是8位10进制的字符串，例如展示的时候可能显示：#A00000000不能为空", groups = {add.class})
    @ChineseDescription("系统编码，用于展示，展示的时候是8位10进制的字符串，例如展示的时候可能显示：#A00000000")
    private String systemCodeShow;

    @ChineseDescription("图标类型：1-文件id，2-选择图片")
    private Integer businessIconType;

    @ChineseDescription("图标编码")
    private String businessIcon;

    @ChineseDescription("模块的图标")
    private Long businessIconFileId;

    @ChineseDescription("表格所属的部门id")
    private Long ownershipDeptId;

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

    @NotNull(message = "批量删除id集合不能为空", groups = batchDelete.class)
    @ChineseDescription("批量删除用的id集合")
    private List<Long> batchDeleteIdList;

    @ChineseDescription("业务数据填报的权限配置")
    private List<BusinessPermission> businessPermissionList;

}
