7/include/project_milestone.hpp

62 lines
1.9 KiB
C++
Raw Normal View History

2026-06-09 02:34:04 +00:00
#ifndef ODF_MANAGEMENT_PROJECT_MILESTONE_HPP
#define ODF_MANAGEMENT_PROJECT_MILESTONE_HPP
#include <string>
#include <cstdint>
/// @brief 里程碑阶段枚举
enum class MilestoneStage : uint8_t {
Requirements = 0, ///< 需求确认
DesignReview = 1, ///< 设计评审
Prototype = 2, ///< 样机测试
Verification = 3, ///< 验证测试
Delivery = 4 ///< 批量交付
};
/**
* @brief
*
* ODF
* 6 12
*/
struct ProjectMilestone {
MilestoneStage stage; ///< 阶段名称
uint32_t weekStart; ///< 计划开始周(从项目启动算起,第 1 周起)
uint32_t weekEnd; ///< 计划结束周
std::string owner; ///< 负责人
bool completed; ///< 完成状态true 已完成)
/**
* @brief
* @param stage
* @param weekStart
* @param weekEnd
* @param owner
* @param completed
*/
ProjectMilestone(MilestoneStage stage,
uint32_t weekStart,
uint32_t weekEnd,
std::string owner,
bool completed);
/// @brief 默认构造函数
ProjectMilestone() = default;
/// @brief 阶段名称字符串
[[nodiscard]] std::string stageString() const;
/// @brief 返回里程碑摘要
[[nodiscard]] std::string summary() const;
/**
* @brief
* @return true
*
* (Prototype) 6(Delivery) 12
*/
[[nodiscard]] bool checkTimeConstraint() const;
};
#endif // ODF_MANAGEMENT_PROJECT_MILESTONE_HPP