package com.competition.modules.sys.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.util.List;

@Data
@Schema(description = "创建/更新字典请求")
public class CreateDictDto {

    @NotBlank(message = "字典名称不能为空")
    @Schema(description = "字典名称")
    private String name;

    @NotBlank(message = "字典编码不能为空")
    @Schema(description = "字典编码")
    private String code;

    @Schema(description = "描述")
    private String description;

    @Schema(description = "字典项列表")
    private List<DictItemDto> items;

    @Data
    public static class DictItemDto {
        private String label;
        private String value;
        private Integer sort;
    }
}
