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

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

/**
 * 工作台项目管理树 Response VO
 */
@Schema(description = "工作台 - 项目管理树 Response VO")
@Data
public class WbProjectTreeRespVO {

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

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

    @Schema(description = "节点类型：directory-目录, project-项目", requiredMode = Schema.RequiredMode.REQUIRED, example = "directory")
    private String nodeType;

    @Schema(description = "名称（目录名称或项目名称）", requiredMode = Schema.RequiredMode.REQUIRED, example = "2026年项目")
    private String name;

    // ========== 以下字段仅项目节点使用 ==========

    @Schema(description = "项目编号（仅项目节点）", example = "PRJ-2026-001")
    private String projectCode;

    @Schema(description = "行业-省市ID（仅项目节点）", example = "1")
    private Long industryProvinceId;

    @Schema(description = "行业-省市名称（仅项目节点）", example = "广东")
    private String industryProvinceName;

    @Schema(description = "行业ID（仅项目节点）", example = "2")
    private Long industryId;

    @Schema(description = "行业名称（仅项目节点）", example = "建筑工程")
    private String industryName;

    @Schema(description = "信息价专业ID（仅项目节点）", example = "100")
    private Long infoPriceProfessionId;

    @Schema(description = "信息价专业名称（仅项目节点）", example = "建筑工程")
    private String infoPriceProfessionName;

    @Schema(description = "信息价专业完整路径（仅项目节点）")
    private Long[] infoPriceProfessionPath;

    @Schema(description = "信息价地区ID（仅项目节点）", example = "200")
    private Long infoPriceRegionId;

    @Schema(description = "信息价地区名称（仅项目节点）", example = "深圳市")
    private String infoPriceRegionName;

    @Schema(description = "信息价地区完整路径（仅项目节点）")
    private Long[] infoPriceRegionPath;

    @Schema(description = "信息价册ID（仅项目节点）", example = "300")
    private Long infoPriceBookId;

    @Schema(description = "信息价册名称（仅项目节点）", example = "2024年1月深圳建筑工程信息价")
    private String infoPriceBookName;

    @Schema(description = "工作内容（仅项目节点）", example = "bid_control_price")
    private String workContent;

    @Schema(description = "文件类型（仅项目节点）", example = "bid_document")
    private String fileType;

    @Schema(description = "参与人员ID数组（仅项目节点）")
    private Long[] memberIds;

    @Schema(description = "项目状态（仅项目节点）", example = "draft")
    private String status;

    @Schema(description = "备注", example = "这是一个测试项目")
    private String remark;

    @Schema(description = "是否已保存至历史库", example = "false")
    private Boolean inHistoryLibrary;

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

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

    @Schema(description = "快照数据（仅项目节点）")
    private Map<String, Object> snapshotJson;

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

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

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

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