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

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * 定额费率项响应 VO
 */
@Schema(description = "管理后台 - 定额费率项响应")
@Data
public class QuotaRateItemRespVO {

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

    @Schema(description = "关联模式节点ID")
    private Long catalogItemId;

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

    @Schema(description = "自定义序号")
    private String customCode;

    @Schema(description = "费率项名称")
    private String name;

    @Schema(description = "费率代号")
    private String rateCode;

    @Schema(description = "是否填写")
    private Boolean isEditable;

    @Schema(description = "默认值")
    private BigDecimal defaultValue;

    @Schema(description = "取值模式")
    private String valueMode;

    @Schema(description = "扩展设置")
    private Map<String, Object> settings;

    @Schema(description = "节点类型")
    private String nodeType;

    @Schema(description = "层级")
    private Integer level;

    @Schema(description = "排序值")
    private Integer sortOrder;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    // ==================== 扩展字段 ====================

    @Schema(description = "字段绑定列表")
    private List<QuotaRateFieldRespVO> fields;

    @Schema(description = "子节点列表")
    private List<QuotaRateItemRespVO> children;

    @Schema(description = "是否有子节点")
    private Boolean hasChildren;
}
