package com.zt.plat.module.base.controller.admin.unitQuantity.vo;

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

@Schema(description = "管理后台 - 量纲及单位树 Response VO")
@Data
public class UnitQuantityTreeRespVO {

    @Schema(description = "量纲ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long id;

    @Schema(description = "量纲名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "长度")
    private String name;

    @Schema(description = "量纲符号", requiredMode = Schema.RequiredMode.REQUIRED, example = "L")
    private String symbol;

    @Schema(description = "量纲描述", example = "用于测量物体长短、距离的物理量")
    private String dsp;

    @Schema(description = "下属单位列表")
    private List<UnitItemVO> units;

    @Schema(description = "单位项")
    @Data
    public static class UnitItemVO {

        @Schema(description = "单位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
        private Long id;

        @Schema(description = "单位名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "米")
        private String name;

        @Schema(description = "单位符号", requiredMode = Schema.RequiredMode.REQUIRED, example = "m")
        private String smb;

        @Schema(description = "是否基准单位", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
        private Integer isBse;

        @Schema(description = "关联关系ID", example = "1")
        private Long relationId;
    }
}
