package cn.stylefeng.team.generator.api.pojo.generator.biz;

import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
import cn.stylefeng.roses.kernel.rule.pojo.dict.SimpleDict;
import cn.stylefeng.team.generator.api.pojo.generator.BaseGeneratorRequest;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
public class BizGeneratorRequest extends BaseGeneratorRequest {

    @ChineseDescription("项目包名称")
    @NotBlank(message = "项目包名称不能为空")
    private String packageName;

    @ChineseDescription("业务id")
    @NotNull(message = "业务id不能为空")
    private Long businessId;

    @ChineseDescription("业务名称")
    @NotBlank(message = "业务名称不能为空")
    private String businessName;

    @ChineseDescription("业务模型列表（多选）")
    @NotEmpty(message = "业务模型列表不能为空")
    private List<SimpleDict> metaModelList;

    @ChineseDescription("新增和编辑的表单模型")
    @NotNull(message = "新增和编辑的表单模型不能为空")
    private SimpleDict form;

    @ChineseDescription("选择列表的视图")
    @NotNull(message = "选择列表的视图不能为空")
    private SimpleDict view;

}

