package com.yhy.module.core.controller.admin.workbench.vo.audit;

import io.swagger.v3.oas.annotations.media.Schema;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
import lombok.Data;

/**
 * 审定分部分项 Response VO（快照数据，可编辑）
 */
@Schema(description = "工作台 - 审定分部分项 Response VO")
@Data
public class AuditApproveDivisionRespVO {

    @Schema(description = "审定分部分项ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long id;

    @Schema(description = "审核编制树的单位工程节点ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long auditCompileTreeId;

    @Schema(description = "来源分部分项ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long sourceDivisionId;

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

    @Schema(description = "节点类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "quota")
    private String nodeType;

    @Schema(description = "来源类型", example = "manual")
    private String sourceType;

    @Schema(description = "编码", example = "010101")
    private String code;

    @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "土石方工程")
    private String name;

    @Schema(description = "单位", example = "m3")
    private String unit;

    @Schema(description = "项目特征", example = "1.土壤类别：一类土")
    private String feature;

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

    @Schema(description = "层级路径")
    private String[] path;

    @Schema(description = "审定工程量", example = "100.00")
    private BigDecimal approveQty;

    @Schema(description = "审定单价", example = "25.50")
    private BigDecimal approveUnitPrice;

    @Schema(description = "审定费率", example = "3.5")
    private BigDecimal approveRate;

    @Schema(description = "审定合价", example = "2550.00")
    private BigDecimal approveTotalPrice;

    @Schema(description = "扩展属性")
    private Map<String, Object> attributes;

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

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

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