hr.model.ts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. // HR模块模型定义
  2. // 员工状态
  3. export type EmployeeStatus = '在职' | '离职' | '试用期';
  4. // 员工基本信息
  5. export interface Employee {
  6. id: string;
  7. name: string;
  8. department: string;
  9. position: string;
  10. employeeId: string;
  11. phone: string;
  12. email: string;
  13. gender: string;
  14. birthDate: Date;
  15. hireDate: Date;
  16. status: EmployeeStatus;
  17. avatar?: string;
  18. contract?: Contract;
  19. certificates?: Certificate[];
  20. }
  21. // 合同信息
  22. export interface Contract {
  23. id: string;
  24. startDate: Date;
  25. endDate: Date;
  26. type: string;
  27. fileUrl?: string;
  28. isExpiringSoon: boolean;
  29. }
  30. // 证件信息
  31. export interface Certificate {
  32. id: string;
  33. name: string;
  34. type: string;
  35. number: string;
  36. issueDate: Date;
  37. expiryDate?: Date;
  38. fileUrl?: string;
  39. }
  40. // 考勤记录
  41. export interface Attendance {
  42. id: string;
  43. employeeId: string;
  44. date: Date;
  45. checkInTime?: Date;
  46. checkOutTime?: Date;
  47. status: '正常' | '迟到' | '早退' | '旷工' | '请假';
  48. workHours: number;
  49. projectId?: string;
  50. projectName?: string;
  51. }
  52. // 资产类型
  53. export type AssetType = '电脑' | '外设' | '软件账号' | '域名' | '其他';
  54. // 资产状态
  55. export type AssetStatus = '空闲' | '占用' | '故障' | '报修中';
  56. // 资产信息
  57. export interface Asset {
  58. id: string;
  59. name: string;
  60. type: AssetType;
  61. status: AssetStatus;
  62. purchaseDate: Date;
  63. value: number;
  64. assignedTo?: string;
  65. assignedToName?: string;
  66. department?: string;
  67. description?: string;
  68. serialNumber?: string;
  69. warrantyExpiry?: Date;
  70. }
  71. // 资产分配记录
  72. export interface AssetAssignment {
  73. id: string;
  74. assetId: string;
  75. employeeId: string;
  76. startDate: Date;
  77. endDate?: Date;
  78. status: '进行中' | '已归还';
  79. }
  80. // 设计师技能
  81. export interface DesignerSkill {
  82. id: string;
  83. name: string;
  84. level: number; // 1-5
  85. }
  86. // 设计师作品
  87. export interface DesignerPortfolioItem {
  88. id: string;
  89. title: string;
  90. description: string;
  91. imageUrl: string;
  92. projectId?: string;
  93. projectName?: string;
  94. completionDate: Date;
  95. rating: number; // 1-5
  96. }
  97. // 部门信息
  98. export interface Department {
  99. id: string;
  100. name: string;
  101. managerId?: string;
  102. managerName?: string;
  103. employeeCount: number;
  104. }
  105. // 岗位信息
  106. export interface Position {
  107. id: string;
  108. name: string;
  109. departmentId: string;
  110. departmentName: string;
  111. level: string;
  112. }