Files
HIS-GUI/include/models/department.h
2026-04-05 20:11:43 +08:00

30 lines
769 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#ifndef DEPARTMENT_H
#define DEPARTMENT_H
#include <string>
#include <vector>
class JsonValue;
// Department 实体科室ID、科室名称、科室描述
class Department {
public:
std::string DepartmentID; // 唯一主键 (UUID)
std::string Name; // 科室名称
std::string Description; // 科室描述
Department();
Department(const std::string& departmentID,
const std::string& name,
const std::string& description = "");
// Generate UUID for new department (不检查唯一性,由调用方保证)
static std::string generateUniqueId();
// JSON bridge (与 Doctor 保持风格一致)
JsonValue toJson() const;
static Department fromJson(const JsonValue& v);
};
#endif