package cn.stylefeng.team.meta.modular.pojo.request;

import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest;
import cn.stylefeng.team.meta.modular.pojo.metadict.MetaUserDictItem;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
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 MetaUserDictRequest extends BaseRequest {

    @NotNull(message = "主键id不能为空", groups = {edit.class, delete.class, detail.class, updateItem.class})
    @ChineseDescription("主键id")
    private Long metaUserDictId;

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

    @ChineseDescription("字典类型编码")
    @NotBlank(message = "字典类型编码不能为空", groups = {add.class, edit.class})
    private String dictTypeCode;

    @ChineseDescription("字典类型名称")
    @NotBlank(message = "字典类型名称不能为空", groups = {add.class, edit.class})
    private String dictTypeName;

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

    @ChineseDescription("字典列表,obj list形式")
    @NotEmpty(message = "字典列表不能为空", groups = {updateItem.class})
    private List<MetaUserDictItem> dictList;

    public @interface updateItem {
    }

}