package com.yhy.module.core.controller.admin.quota.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Map;
import javax.validation.constraints.NotBlank;
import lombok.Data;

/**
 * 定额目录条目保存 Request VO
 * 
 * @author yhy
 */
@Schema(description = "管理后台 - 定额目录条目保存 Request VO")
@Data
public class QuotaCatalogItemSaveReqVO {

    @Schema(description = "主键ID（更新时必填）", example = "1")
    private Long id;

    @Schema(description = "父节点ID", example = "1")
    private Long parentId;

    @Schema(description = "工料机机类树节点ID（定额专业绑定时使用）", example = "1")
    private Long categoryTreeId;

    @Schema(description = "条目编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "DE001")
    @NotBlank(message = "条目编码不能为空")
    private String code;

    @Schema(description = "条目名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "土石方工程")
    @NotBlank(message = "条目名称不能为空")
    private String name;

    @Schema(description = "计量单位", example = "m³")
    private String unit;

    @Schema(description = "排序", example = "1")
    private Integer sortOrder;

    @Schema(description = "扩展属性", example = "{\"node_type\":\"specialty\"}")
    private Map<String, Object> attributes;
}
