package com.backendsys.entity.System.SysFile;

import com.backendsys.entity.validator.RangeArray;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

@Data
public class SysFileCategoryDTO {

    public static interface Create{}
    public static interface Update{}

    private Long id;
    @NotNull(message = "分类ID不能为空", groups = { Create.class, Update.class })
    private Long category_id;

    @Size(max = 50, message = "分类名称长度不超过 {max} 字符", groups = { Create.class, Update.class })
    private String category_name;

    @Size(max = 1000, message = "文件后缀名长度不超过 {max} 字符", groups = { Create.class, Update.class })
    private String suffix;

    @Range(min = 1, max = 9999, message = "排序必须在 {min} 到 {max} 之间")
    private Integer sort;
    @RangeArray(message="状态取值有误，范围应是(-1禁用, 1启用)", value = {"-1", "1"}, groups = { Create.class, Update.class })
    private Integer status;
}
