package com.sckw.system.model.vo.req;

import com.sckw.core.web.request.PageReq;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.io.Serializable;

/**
 * 字典类型请求参数对象
 * @author system
 * @date 2024
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Schema(description = "字典类型请求参数对象")
public class SysDictTypeReqVo extends PageReq {

    @Serial
    private static final long serialVersionUID = 7701153842223116600L;

    /**
     * 主键ID
     */
    @Schema(description = "主键ID")
    private Long id;

    /**
     * 字典类型实体
     */
    @Schema(description = "字典类型实体")
    private SysDictTypeInfo entity;

    /**
     * 字典类型名称
     */
    @Schema(description = "字典类型名称")
    private String name;

    /**
     * 类型
     */
    @Schema(description = "类型")
    private String type;

    /**
     * 状态
     */
    @Schema(description = "状态")
    private Integer status;

    /**
     * 搜索关键词（用于下拉搜索）
     */
    @Schema(description = "搜索关键词（用于下拉搜索）")
    private String keyword;

    @Data
    @Schema(description = "字典类型信息")
    public static class SysDictTypeInfo implements Serializable {
        @Serial
        private static final long serialVersionUID = 1L;

        /**
         * 主键
         */
        @Schema(description = "主键")
        private Long id;

        /**
         * 字典类型名称
         */
        @Schema(description = "字典类型名称")
        private String name;

        /**
         * 类型
         */
        @Schema(description = "类型")
        private String type;

        /**
         * 备注
         */
        @Size(max = 200, message = "备注长度不能超过200")
        @Schema(description = "备注", maxLength = 200)
        private String remark;
    }
}
