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;

/**
 * 定额子目 Response VO
 * 
 * @author yhy
 */
@Schema(description = "管理后台 - 定额子目 Response VO")
@Data
public class QuotaItemRespVO {

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

    @Schema(description = "定额条目ID", example = "1")
    private Long catalogItemId;

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

    @Schema(description = "定额基价", example = "123.45")
    private BigDecimal basePrice;

    @Schema(description = "合价/金额", example = "1234.50")
    private BigDecimal amount;

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

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

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

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

    @Schema(description = "人工费", example = "50.00")
    private BigDecimal laborCost;

    @Schema(description = "材料费", example = "60.00")
    private BigDecimal materialCost;

    @Schema(description = "机械费", example = "13.45")
    private BigDecimal machineCost;

    @Schema(description = "版本号", example = "2020-v1.0")
    private String versionNo;

    @Schema(description = "备注", example = "备注信息")
    private String remark;

    @Schema(description = "工料机组成列表")
    private List<QuotaResourceRespVO> resources;

    @Schema(description = "定额条目信息")
    private QuotaCatalogItemRespVO catalogItem;
}
