package cn.stylefeng.team.portal.modular.management.pojo.request;

import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest;
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 CommonAppLinkRequest extends BaseRequest {

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

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

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

    @ChineseDescription("图标类型：1-文件id，2-选择图片")
    @NotNull(message = "图标类型不能为空", groups = {add.class, edit.class})
    private Integer iconType;

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

    @ChineseDescription("链接图标的文件id")
    private Long linkIconFileId;

    @ChineseDescription("跳转方式：1-内部路由，2-外部链接")
    @NotNull(message = "跳转方式不能为空", groups = {add.class, edit.class})
    private Integer redirectType;

    @ChineseDescription("跳转路由")
    @NotBlank(message = "跳转路由不能为空", groups = {add.class, edit.class})
    private String redirectUrl;

    @ChineseDescription("打开方式：1-本页面打开，2-新标签打开")
    @NotNull(message = "打开方式不能为空", groups = {add.class, edit.class})
    private Integer openType;

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

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

}