package com.backendsys.entity.Med;

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

import java.util.List;

@Data
public class MedMyMaterialDTO {
    public static interface Detail{}
    public static interface Create{}
    public static interface Update{}
    public static interface Delete{}

    /**
     * med_material
     */

    private Long id;

    @NotNull(message="my_material_id 不能为空", groups = { MedMyMaterialDTO.Detail.class })
    private Long my_material_id;
    private List<Long> my_material_ids;

    // @NotNull(message="素材ID不能为空", groups = {MedMyMaterialDTO.Create.class })
    private Long material_id;

    private Long user_id;

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

    @Size(max = 100, message = "素材标题长度不超过 {max} 字符")
    private String title;

    @Size(max = 200, message = "素材描述长度不超过 {max} 字符", groups = {MedMyMaterialDTO.Create.class, MedMyMaterialDTO.Update.class })
    private String description;

    @Size(max = 10000, message = "素材内容长度不超过 {max} 字符", groups = {MedMyMaterialDTO.Create.class, MedMyMaterialDTO.Update.class })
    private String content;
    private String thumb;

    @RangeArray(message="素材类型取值有误，范围应是(1图片, 2视频, 3音频, 4文案)", value = {"1", "2", "3", "4"}, groups = { MedMyMaterialDTO.Create.class })
    private Integer material_type;

    @Size(max = 500, message = "文件路径长度不超过 {max} 字符", groups = {MedMyMaterialDTO.Create.class, MedMyMaterialDTO.Update.class})
    private String file;

    private String create_time;
    private String update_time;

}
