@driveup/schema 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/README.md +174 -0
  2. package/lib/catalog/addon/addon.entity.d.ts +109 -0
  3. package/lib/catalog/addon/addon.entity.js +260 -0
  4. package/lib/catalog/addon/addon.entity.js.map +1 -0
  5. package/lib/catalog/addon/country.entity.d.ts +112 -0
  6. package/lib/catalog/addon/country.entity.js +246 -0
  7. package/lib/catalog/addon/country.entity.js.map +1 -0
  8. package/lib/catalog/driving/category.entity.d.ts +122 -0
  9. package/lib/catalog/driving/category.entity.js +217 -0
  10. package/lib/catalog/driving/category.entity.js.map +1 -0
  11. package/lib/catalog/driving/vehicle.entity.d.ts +49 -0
  12. package/lib/catalog/driving/vehicle.entity.js +97 -0
  13. package/lib/catalog/driving/vehicle.entity.js.map +1 -0
  14. package/lib/catalog/priceplan/priceplan.entity.d.ts +123 -0
  15. package/lib/catalog/priceplan/priceplan.entity.js +288 -0
  16. package/lib/catalog/priceplan/priceplan.entity.js.map +1 -0
  17. package/lib/catalog/product/country.entity.d.ts +109 -0
  18. package/lib/catalog/product/country.entity.js +233 -0
  19. package/lib/catalog/product/country.entity.js.map +1 -0
  20. package/lib/catalog/product/priceplan.entity.d.ts +113 -0
  21. package/lib/catalog/product/priceplan.entity.js +251 -0
  22. package/lib/catalog/product/priceplan.entity.js.map +1 -0
  23. package/lib/catalog/product/product.entity.d.ts +104 -0
  24. package/lib/catalog/product/product.entity.js +262 -0
  25. package/lib/catalog/product/product.entity.js.map +1 -0
  26. package/lib/catalog/program/program.entity.d.ts +107 -0
  27. package/lib/catalog/program/program.entity.js +247 -0
  28. package/lib/catalog/program/program.entity.js.map +1 -0
  29. package/lib/catalog/seed/assets/asset.entity.d.ts +68 -0
  30. package/lib/catalog/seed/assets/asset.entity.js +163 -0
  31. package/lib/catalog/seed/assets/asset.entity.js.map +1 -0
  32. package/lib/catalog/seed/courses/course.entity.d.ts +98 -0
  33. package/lib/catalog/seed/courses/course.entity.js +216 -0
  34. package/lib/catalog/seed/courses/course.entity.js.map +1 -0
  35. package/lib/catalog/seed/courses/lesson.entity.d.ts +90 -0
  36. package/lib/catalog/seed/courses/lesson.entity.js +214 -0
  37. package/lib/catalog/seed/courses/lesson.entity.js.map +1 -0
  38. package/lib/catalog/seed/courses/topic.entity.d.ts +77 -0
  39. package/lib/catalog/seed/courses/topic.entity.js +185 -0
  40. package/lib/catalog/seed/courses/topic.entity.js.map +1 -0
  41. package/lib/catalog/seed/expense/category.entity.d.ts +61 -0
  42. package/lib/catalog/seed/expense/category.entity.js +153 -0
  43. package/lib/catalog/seed/expense/category.entity.js.map +1 -0
  44. package/lib/index.d.ts +67 -0
  45. package/lib/index.js +89 -0
  46. package/lib/index.js.map +1 -0
  47. package/lib/profile/agent/agent.entity.d.ts +95 -0
  48. package/lib/profile/agent/agent.entity.js +223 -0
  49. package/lib/profile/agent/agent.entity.js.map +1 -0
  50. package/lib/profile/agent/payout.entity.d.ts +70 -0
  51. package/lib/profile/agent/payout.entity.js +160 -0
  52. package/lib/profile/agent/payout.entity.js.map +1 -0
  53. package/lib/profile/agent/promotion.entity.d.ts +82 -0
  54. package/lib/profile/agent/promotion.entity.js +174 -0
  55. package/lib/profile/agent/promotion.entity.js.map +1 -0
  56. package/lib/profile/company/company.entity.d.ts +234 -0
  57. package/lib/profile/company/company.entity.js +558 -0
  58. package/lib/profile/company/company.entity.js.map +1 -0
  59. package/lib/profile/company/course/appointment.entity.d.ts +111 -0
  60. package/lib/profile/company/course/appointment.entity.js +240 -0
  61. package/lib/profile/company/course/appointment.entity.js.map +1 -0
  62. package/lib/profile/company/course/course.entity.d.ts +156 -0
  63. package/lib/profile/company/course/course.entity.js +365 -0
  64. package/lib/profile/company/course/course.entity.js.map +1 -0
  65. package/lib/profile/company/course/lesson.entity.d.ts +123 -0
  66. package/lib/profile/company/course/lesson.entity.js +288 -0
  67. package/lib/profile/company/course/lesson.entity.js.map +1 -0
  68. package/lib/profile/company/course/topic.entity.d.ts +55 -0
  69. package/lib/profile/company/course/topic.entity.js +147 -0
  70. package/lib/profile/company/course/topic.entity.js.map +1 -0
  71. package/lib/profile/company/finances/billing/bill.entity.d.ts +145 -0
  72. package/lib/profile/company/finances/billing/bill.entity.js +338 -0
  73. package/lib/profile/company/finances/billing/bill.entity.js.map +1 -0
  74. package/lib/profile/company/finances/billing/item.entity.d.ts +75 -0
  75. package/lib/profile/company/finances/billing/item.entity.js +219 -0
  76. package/lib/profile/company/finances/billing/item.entity.js.map +1 -0
  77. package/lib/profile/company/finances/billing/transaction.entity.d.ts +44 -0
  78. package/lib/profile/company/finances/billing/transaction.entity.js +158 -0
  79. package/lib/profile/company/finances/billing/transaction.entity.js.map +1 -0
  80. package/lib/profile/company/finances/expense/category.entity.d.ts +55 -0
  81. package/lib/profile/company/finances/expense/category.entity.js +117 -0
  82. package/lib/profile/company/finances/expense/category.entity.js.map +1 -0
  83. package/lib/profile/company/finances/expense/expense.entity.d.ts +48 -0
  84. package/lib/profile/company/finances/expense/expense.entity.js +171 -0
  85. package/lib/profile/company/finances/expense/expense.entity.js.map +1 -0
  86. package/lib/profile/company/finances/handover/handover.entity.d.ts +44 -0
  87. package/lib/profile/company/finances/handover/handover.entity.js +202 -0
  88. package/lib/profile/company/finances/handover/handover.entity.js.map +1 -0
  89. package/lib/profile/company/finances/invoice/invoice.entity.d.ts +65 -0
  90. package/lib/profile/company/finances/invoice/invoice.entity.js +296 -0
  91. package/lib/profile/company/finances/invoice/invoice.entity.js.map +1 -0
  92. package/lib/profile/company/finances/invoice/item.entity.d.ts +25 -0
  93. package/lib/profile/company/finances/invoice/item.entity.js +148 -0
  94. package/lib/profile/company/finances/invoice/item.entity.js.map +1 -0
  95. package/lib/profile/company/finances/payment/method.entity.d.ts +35 -0
  96. package/lib/profile/company/finances/payment/method.entity.js +143 -0
  97. package/lib/profile/company/finances/payment/method.entity.js.map +1 -0
  98. package/lib/profile/company/finances/peyment/method.entity.d.ts +35 -0
  99. package/lib/profile/company/finances/peyment/method.entity.js +143 -0
  100. package/lib/profile/company/finances/peyment/method.entity.js.map +1 -0
  101. package/lib/profile/company/finances/peyment-method/payment-method.d.ts +34 -0
  102. package/lib/profile/company/finances/peyment-method/payment-method.js +118 -0
  103. package/lib/profile/company/finances/peyment-method/payment-method.js.map +1 -0
  104. package/lib/profile/company/instructor/instructor.entity.d.ts +85 -0
  105. package/lib/profile/company/instructor/instructor.entity.js +254 -0
  106. package/lib/profile/company/instructor/instructor.entity.js.map +1 -0
  107. package/lib/profile/company/instructor/task.entity.d.ts +60 -0
  108. package/lib/profile/company/instructor/task.entity.js +133 -0
  109. package/lib/profile/company/instructor/task.entity.js.map +1 -0
  110. package/lib/profile/company/medical/examination.entity.d.ts +59 -0
  111. package/lib/profile/company/medical/examination.entity.js +175 -0
  112. package/lib/profile/company/medical/examination.entity.js.map +1 -0
  113. package/lib/profile/company/medical/product.entity.d.ts +99 -0
  114. package/lib/profile/company/medical/product.entity.js +270 -0
  115. package/lib/profile/company/medical/product.entity.js.map +1 -0
  116. package/lib/profile/company/metrics/company.metric.d.ts +21 -0
  117. package/lib/profile/company/metrics/company.metric.js +122 -0
  118. package/lib/profile/company/metrics/company.metric.js.map +1 -0
  119. package/lib/profile/company/product/addon.entity.d.ts +93 -0
  120. package/lib/profile/company/product/addon.entity.js +234 -0
  121. package/lib/profile/company/product/addon.entity.js.map +1 -0
  122. package/lib/profile/company/product/priceplan.entity.d.ts +57 -0
  123. package/lib/profile/company/product/priceplan.entity.js +167 -0
  124. package/lib/profile/company/product/priceplan.entity.js.map +1 -0
  125. package/lib/profile/company/product/product.entity.d.ts +171 -0
  126. package/lib/profile/company/product/product.entity.js +383 -0
  127. package/lib/profile/company/product/product.entity.js.map +1 -0
  128. package/lib/profile/company/product/vehicle.entity.d.ts +46 -0
  129. package/lib/profile/company/product/vehicle.entity.js +144 -0
  130. package/lib/profile/company/product/vehicle.entity.js.map +1 -0
  131. package/lib/profile/instructor/instructor.entity.d.ts +80 -0
  132. package/lib/profile/instructor/instructor.entity.js +186 -0
  133. package/lib/profile/instructor/instructor.entity.js.map +1 -0
  134. package/lib/profile/student/program/licence/licence.entity.d.ts +66 -0
  135. package/lib/profile/student/program/licence/licence.entity.js +187 -0
  136. package/lib/profile/student/program/licence/licence.entity.js.map +1 -0
  137. package/lib/profile/student/program/medical/certificate.entity.d.ts +84 -0
  138. package/lib/profile/student/program/medical/certificate.entity.js +244 -0
  139. package/lib/profile/student/program/medical/certificate.entity.js.map +1 -0
  140. package/lib/profile/student/program/medical/examination.model.d.ts +65 -0
  141. package/lib/profile/student/program/medical/examination.model.js +209 -0
  142. package/lib/profile/student/program/medical/examination.model.js.map +1 -0
  143. package/lib/profile/student/program/program.entity.d.ts +78 -0
  144. package/lib/profile/student/program/program.entity.js +225 -0
  145. package/lib/profile/student/program/program.entity.js.map +1 -0
  146. package/lib/profile/student/program/training/appointment.entity.d.ts +151 -0
  147. package/lib/profile/student/program/training/appointment.entity.js +441 -0
  148. package/lib/profile/student/program/training/appointment.entity.js.map +1 -0
  149. package/lib/profile/student/program/training/exam.entity.d.ts +41 -0
  150. package/lib/profile/student/program/training/exam.entity.js +141 -0
  151. package/lib/profile/student/program/training/exam.entity.js.map +1 -0
  152. package/lib/profile/student/program/training/lesson.entity.d.ts +84 -0
  153. package/lib/profile/student/program/training/lesson.entity.js +221 -0
  154. package/lib/profile/student/program/training/lesson.entity.js.map +1 -0
  155. package/lib/profile/student/program/training/request.entity.d.ts +56 -0
  156. package/lib/profile/student/program/training/request.entity.js +159 -0
  157. package/lib/profile/student/program/training/request.entity.js.map +1 -0
  158. package/lib/profile/student/program/training/topic.entity.d.ts +109 -0
  159. package/lib/profile/student/program/training/topic.entity.js +255 -0
  160. package/lib/profile/student/program/training/topic.entity.js.map +1 -0
  161. package/lib/profile/student/program/training/training.entity.d.ts +167 -0
  162. package/lib/profile/student/program/training/training.entity.js +501 -0
  163. package/lib/profile/student/program/training/training.entity.js.map +1 -0
  164. package/lib/profile/student/program/training/transaction.entity.d.ts +111 -0
  165. package/lib/profile/student/program/training/transaction.entity.js +266 -0
  166. package/lib/profile/student/program/training/transaction.entity.js.map +1 -0
  167. package/lib/profile/student/student.entity.d.ts +89 -0
  168. package/lib/profile/student/student.entity.js +183 -0
  169. package/lib/profile/student/student.entity.js.map +1 -0
  170. package/lib/system/campaign/campaign.entity.d.ts +68 -0
  171. package/lib/system/campaign/campaign.entity.js +150 -0
  172. package/lib/system/campaign/campaign.entity.js.map +1 -0
  173. package/lib/system/campaign/gifcode.entity.d.ts +14 -0
  174. package/lib/system/campaign/gifcode.entity.js +77 -0
  175. package/lib/system/campaign/gifcode.entity.js.map +1 -0
  176. package/lib/system/campaigne/campaign.entity.d.ts +69 -0
  177. package/lib/system/campaigne/campaign.entity.js +179 -0
  178. package/lib/system/campaigne/campaign.entity.js.map +1 -0
  179. package/lib/system/campaigne/gifcode.entity.d.ts +54 -0
  180. package/lib/system/campaigne/gifcode.entity.js +126 -0
  181. package/lib/system/campaigne/gifcode.entity.js.map +1 -0
  182. package/lib/system/country/country.entity.d.ts +121 -0
  183. package/lib/system/country/country.entity.js +284 -0
  184. package/lib/system/country/country.entity.js.map +1 -0
  185. package/lib/system/country/country.metric.d.ts +12 -0
  186. package/lib/system/country/country.metric.js +68 -0
  187. package/lib/system/country/country.metric.js.map +1 -0
  188. package/lib/system/currency/currency.entity.d.ts +46 -0
  189. package/lib/system/currency/currency.entity.js +112 -0
  190. package/lib/system/currency/currency.entity.js.map +1 -0
  191. package/lib/system/driving/category.entity.d.ts +146 -0
  192. package/lib/system/driving/category.entity.js +321 -0
  193. package/lib/system/driving/category.entity.js.map +1 -0
  194. package/lib/system/driving/vehicle.entity.d.ts +54 -0
  195. package/lib/system/driving/vehicle.entity.js +130 -0
  196. package/lib/system/driving/vehicle.entity.js.map +1 -0
  197. package/lib/system/event/business.entity.d.ts +75 -0
  198. package/lib/system/event/business.entity.js +170 -0
  199. package/lib/system/event/business.entity.js.map +1 -0
  200. package/lib/system/event/log.entity.d.ts +103 -0
  201. package/lib/system/event/log.entity.js +202 -0
  202. package/lib/system/event/log.entity.js.map +1 -0
  203. package/lib/system/policy/policy.entity.d.ts +90 -0
  204. package/lib/system/policy/policy.entity.js +226 -0
  205. package/lib/system/policy/policy.entity.js.map +1 -0
  206. package/lib/system/staff/staff.entity.d.ts +72 -0
  207. package/lib/system/staff/staff.entity.js +186 -0
  208. package/lib/system/staff/staff.entity.js.map +1 -0
  209. package/lib/tsconfig.tsbuildinfo +1 -0
  210. package/lib/user/alert.entity.d.ts +95 -0
  211. package/lib/user/alert.entity.js +223 -0
  212. package/lib/user/alert.entity.js.map +1 -0
  213. package/lib/user/blocked.entity.d.ts +42 -0
  214. package/lib/user/blocked.entity.js +83 -0
  215. package/lib/user/blocked.entity.js.map +1 -0
  216. package/lib/user/device.entity.d.ts +72 -0
  217. package/lib/user/device.entity.js +182 -0
  218. package/lib/user/device.entity.js.map +1 -0
  219. package/lib/user/notification.entity.d.ts +87 -0
  220. package/lib/user/notification.entity.js +219 -0
  221. package/lib/user/notification.entity.js.map +1 -0
  222. package/lib/user/ticket.entity.d.ts +85 -0
  223. package/lib/user/ticket.entity.js +231 -0
  224. package/lib/user/ticket.entity.js.map +1 -0
  225. package/lib/user/user.entity.d.ts +235 -0
  226. package/lib/user/user.entity.js +573 -0
  227. package/lib/user/user.entity.js.map +1 -0
  228. package/lib/user/verification.entity.d.ts +75 -0
  229. package/lib/user/verification.entity.js +142 -0
  230. package/lib/user/verification.entity.js.map +1 -0
  231. package/lib/utils/activity.helper.d.ts +26 -0
  232. package/lib/utils/activity.helper.js +39 -0
  233. package/lib/utils/activity.helper.js.map +1 -0
  234. package/lib/utils/index.d.ts +4 -0
  235. package/lib/utils/index.js +21 -0
  236. package/lib/utils/index.js.map +1 -0
  237. package/lib/utils/json-metrics.transform.d.ts +35 -0
  238. package/lib/utils/json-metrics.transform.js +83 -0
  239. package/lib/utils/json-metrics.transform.js.map +1 -0
  240. package/lib/utils/numeric.transform.d.ts +38 -0
  241. package/lib/utils/numeric.transform.js +74 -0
  242. package/lib/utils/numeric.transform.js.map +1 -0
  243. package/lib/utils/trackable.entity.d.ts +82 -0
  244. package/lib/utils/trackable.entity.js +100 -0
  245. package/lib/utils/trackable.entity.js.map +1 -0
  246. package/package.json +49 -0
@@ -0,0 +1,59 @@
1
+ import { Activity, MedicalExamination, Person, WeekDay } from '@driveup/common';
2
+ import { CompanyMedicalProductEntity } from './product.entity';
3
+ import { StudentMedicalExaminationEntity } from '../../student/program/medical/examination.model';
4
+ import { TrackableEntity } from '../../../utils';
5
+ export declare class CompanyMedicalExaminationEntity extends TrackableEntity<MedicalExamination> {
6
+ medicalProductId: number;
7
+ /**
8
+ * Default examioner for this examination
9
+ */
10
+ examinerId: number;
11
+ /**
12
+ * Start date of the recurring examination appointments
13
+ */
14
+ startDate: Date;
15
+ /**
16
+ * Repeat until this date
17
+ * (only used for repeated definitions)
18
+ */
19
+ endDate: Date;
20
+ duration: number;
21
+ repetition: boolean;
22
+ weekdays: WeekDay[];
23
+ /**
24
+ * Skipped dates for this recurring appointment
25
+ */
26
+ skippedDates: Date[];
27
+ /**
28
+ * Changed dates for this recurring appointment
29
+ */
30
+ updates: {
31
+ from: Date;
32
+ to: Date;
33
+ }[];
34
+ /**
35
+ * Different instructors for specific dates
36
+ */
37
+ examiner: Person;
38
+ /**
39
+ * Different durations for specific dates
40
+ */
41
+ durations: {
42
+ date: Date;
43
+ duration: number;
44
+ }[];
45
+ /**
46
+ * Company medical product relation
47
+ */
48
+ medicalProduct: Promise<CompanyMedicalProductEntity>;
49
+ /**
50
+ * Student medical examinations relation.
51
+ * All students that have taken this examination.
52
+ * Passed examination will be recorded as student medical certification.
53
+ */
54
+ students: Promise<StudentMedicalExaminationEntity[]>;
55
+ constructor(props?: Partial<CompanyMedicalExaminationEntity>);
56
+ toModel(): MedicalExamination;
57
+ toSummary(): MedicalExamination;
58
+ getActivities(): Promise<Activity[]>;
59
+ }
@@ -0,0 +1,175 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CompanyMedicalExaminationEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const common_1 = require("@driveup/common");
15
+ const product_entity_1 = require("./product.entity");
16
+ const examination_model_1 = require("../../student/program/medical/examination.model");
17
+ const utils_1 = require("../../../utils");
18
+ let CompanyMedicalExaminationEntity = class CompanyMedicalExaminationEntity extends utils_1.TrackableEntity {
19
+ medicalProductId;
20
+ /**
21
+ * Default examioner for this examination
22
+ */
23
+ examinerId;
24
+ /**
25
+ * Start date of the recurring examination appointments
26
+ */
27
+ startDate;
28
+ /**
29
+ * Repeat until this date
30
+ * (only used for repeated definitions)
31
+ */
32
+ endDate;
33
+ duration;
34
+ repetition;
35
+ weekdays;
36
+ /**
37
+ * Skipped dates for this recurring appointment
38
+ */
39
+ skippedDates;
40
+ /**
41
+ * Changed dates for this recurring appointment
42
+ */
43
+ updates;
44
+ /**
45
+ * Different instructors for specific dates
46
+ */
47
+ examiner;
48
+ /**
49
+ * Different durations for specific dates
50
+ */
51
+ durations;
52
+ /**
53
+ * Company medical product relation
54
+ */
55
+ medicalProduct;
56
+ /**
57
+ * Student medical examinations relation.
58
+ * All students that have taken this examination.
59
+ * Passed examination will be recorded as student medical certification.
60
+ */
61
+ students;
62
+ constructor(props) {
63
+ super();
64
+ Object.assign(this, props);
65
+ }
66
+ toModel() {
67
+ return new common_1.MedicalExamination({
68
+ id: this.id,
69
+ startDate: this.startDate,
70
+ endDate: this.endDate,
71
+ duration: this.duration,
72
+ repetition: this.repetition,
73
+ weekdays: this.weekdays,
74
+ skippedDates: this.skippedDates,
75
+ updates: this.updates,
76
+ examiner: this.examiner,
77
+ durations: this.durations
78
+ });
79
+ }
80
+ toSummary() {
81
+ return this.toModel();
82
+ }
83
+ async getActivities() {
84
+ const activities = [];
85
+ activities.push(await (0, utils_1.toActivity)(this.createdBy, common_1.ActivityType.createdBy));
86
+ activities.push(await (0, utils_1.toActivity)(this.createdOn, common_1.ActivityType.createdOn));
87
+ activities.push(await (0, utils_1.toActivity)(this.updatedBy, common_1.ActivityType.updatedBy));
88
+ activities.push(await (0, utils_1.toActivity)(this.updatedOn, common_1.ActivityType.updatedOn));
89
+ return activities.filter(a => a);
90
+ }
91
+ };
92
+ exports.CompanyMedicalExaminationEntity = CompanyMedicalExaminationEntity;
93
+ __decorate([
94
+ (0, typeorm_1.Column)(),
95
+ __metadata("design:type", Number)
96
+ ], CompanyMedicalExaminationEntity.prototype, "medicalProductId", void 0);
97
+ __decorate([
98
+ (0, typeorm_1.Column)({
99
+ nullable: true,
100
+ default: null
101
+ }),
102
+ __metadata("design:type", Number)
103
+ ], CompanyMedicalExaminationEntity.prototype, "examinerId", void 0);
104
+ __decorate([
105
+ (0, typeorm_1.Column)(),
106
+ __metadata("design:type", Date)
107
+ ], CompanyMedicalExaminationEntity.prototype, "startDate", void 0);
108
+ __decorate([
109
+ (0, typeorm_1.Column)({
110
+ nullable: true,
111
+ default: null
112
+ }),
113
+ __metadata("design:type", Date)
114
+ ], CompanyMedicalExaminationEntity.prototype, "endDate", void 0);
115
+ __decorate([
116
+ (0, typeorm_1.Column)({ default: 60 }),
117
+ __metadata("design:type", Number)
118
+ ], CompanyMedicalExaminationEntity.prototype, "duration", void 0);
119
+ __decorate([
120
+ (0, typeorm_1.Column)({ default: false }),
121
+ __metadata("design:type", Boolean)
122
+ ], CompanyMedicalExaminationEntity.prototype, "repetition", void 0);
123
+ __decorate([
124
+ (0, typeorm_1.Column)({
125
+ type: 'simple-json',
126
+ nullable: true,
127
+ default: null
128
+ }),
129
+ __metadata("design:type", Array)
130
+ ], CompanyMedicalExaminationEntity.prototype, "weekdays", void 0);
131
+ __decorate([
132
+ (0, typeorm_1.Column)({
133
+ type: 'simple-json',
134
+ nullable: true,
135
+ default: null
136
+ }),
137
+ __metadata("design:type", Array)
138
+ ], CompanyMedicalExaminationEntity.prototype, "skippedDates", void 0);
139
+ __decorate([
140
+ (0, typeorm_1.Column)({
141
+ type: 'simple-json',
142
+ nullable: true,
143
+ default: null
144
+ }),
145
+ __metadata("design:type", Array)
146
+ ], CompanyMedicalExaminationEntity.prototype, "updates", void 0);
147
+ __decorate([
148
+ (0, typeorm_1.Column)({
149
+ type: 'simple-json',
150
+ nullable: true,
151
+ default: null
152
+ }),
153
+ __metadata("design:type", common_1.Person)
154
+ ], CompanyMedicalExaminationEntity.prototype, "examiner", void 0);
155
+ __decorate([
156
+ (0, typeorm_1.Column)({
157
+ type: 'simple-json',
158
+ nullable: true,
159
+ default: null
160
+ }),
161
+ __metadata("design:type", Array)
162
+ ], CompanyMedicalExaminationEntity.prototype, "durations", void 0);
163
+ __decorate([
164
+ (0, typeorm_1.ManyToOne)(() => product_entity_1.CompanyMedicalProductEntity, product => product.examinations),
165
+ __metadata("design:type", Promise)
166
+ ], CompanyMedicalExaminationEntity.prototype, "medicalProduct", void 0);
167
+ __decorate([
168
+ (0, typeorm_1.OneToMany)(() => examination_model_1.StudentMedicalExaminationEntity, student => student.examination),
169
+ __metadata("design:type", Promise)
170
+ ], CompanyMedicalExaminationEntity.prototype, "students", void 0);
171
+ exports.CompanyMedicalExaminationEntity = CompanyMedicalExaminationEntity = __decorate([
172
+ (0, typeorm_1.Entity)('companyMedicalExaminations'),
173
+ __metadata("design:paramtypes", [Object])
174
+ ], CompanyMedicalExaminationEntity);
175
+ //# sourceMappingURL=examination.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"examination.entity.js","sourceRoot":"","sources":["../../../../src/profile/company/medical/examination.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA+D;AAC/D,4CAA8F;AAC9F,qDAA+D;AAC/D,uFAAkG;AAClG,0CAA6D;AAGtD,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,uBAAmC;IAGvF,gBAAgB,CAAS;IAEzB;;OAEG;IAKH,UAAU,CAAS;IAEnB;;OAEG;IAEH,SAAS,CAAO;IAEhB;;;OAGG;IAKH,OAAO,CAAO;IAGd,QAAQ,CAAS;IAGjB,UAAU,CAAU;IAOpB,QAAQ,CAAY;IAEpB;;OAEG;IAMH,YAAY,CAAS;IAErB;;OAEG;IAMH,OAAO,CAGH;IAEJ;;OAEG;IAMH,QAAQ,CAAS;IAEjB;;OAEG;IAMH,SAAS,CAGL;IAEJ;;OAEG;IAEH,cAAc,CAAuC;IAErD;;;;OAIG;IAEH,QAAQ,CAA6C;IAErD,YAAY,KAAgD;QAC3D,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,OAAO;QACN,OAAO,IAAI,2BAAkB,CAAC;YAC7B,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB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AA,gBAAM,EAAC;QACP,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;iEACkB;AAUpB;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;qEACmB;AAUrB;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;gEAIE;AAUJ;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;8BACQ,eAAM;iEAAC;AAUjB;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;kEAIE;AAMJ;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,4CAA2B,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC;;uEACzB;AAQrD;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,mDAA+B,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC;;iEAC5B;0CArGzC,+BAA+B;IAD3C,IAAA,gBAAM,EAAC,4BAA4B,CAAC;;GACxB,+BAA+B,CAuI3C"}
@@ -0,0 +1,99 @@
1
+ import { AddonUsage, AddonType, Activity, Address } from '@driveup/common';
2
+ import { ProductStatus, MedicalProduct, Picture, Person } from '@driveup/common';
3
+ import { CompanyProductEntity } from '../product/product.entity';
4
+ import { DrivingCategoryEntity } from '../../../system/driving/category.entity';
5
+ import { CompanyMedicalExaminationEntity } from './examination.entity';
6
+ import { TrackableEntity } from '../../../utils';
7
+ export declare class CompanyMedicalProductEntity extends TrackableEntity<MedicalProduct> {
8
+ /**
9
+ * Company medical product
10
+ * Allow only medical products
11
+ */
12
+ productId: number;
13
+ /**
14
+ * Driveup driving catregory
15
+ * Optionally, if examination is category specific
16
+ */
17
+ categoryId: number;
18
+ /**
19
+ * Allow booking only if the examination is active
20
+ */
21
+ status: ProductStatus;
22
+ /**
23
+ * Examination name
24
+ * (e.g. Eye Test, etc..)
25
+ */
26
+ title: string;
27
+ /**
28
+ * Company training description
29
+ */
30
+ description: string;
31
+ /**
32
+ * Promotion image URL for search engine visibility
33
+ */
34
+ imageUrl: string;
35
+ /**
36
+ * Collection of images for the medical product gallery
37
+ */
38
+ gallery: Picture[];
39
+ /**
40
+ * List of authorized examiners for this medical product
41
+ */
42
+ examiners: Person[];
43
+ /**
44
+ * Price for the medical examination
45
+ */
46
+ price: number;
47
+ /**
48
+ * Duration of the medical examination in minutes
49
+ */
50
+ duration: number;
51
+ /**
52
+ * Physical location where the medical examination takes place
53
+ */
54
+ location: Address;
55
+ /**
56
+ * Activate addons for this course
57
+ */
58
+ addons: AddonUsage[];
59
+ /**
60
+ * ID of the user who published this medical product
61
+ */
62
+ publishedBy: number;
63
+ /**
64
+ * Timestamp when this medical product was published
65
+ */
66
+ publishedOn: Date;
67
+ /**
68
+ * ID of the user who ended this medical product
69
+ */
70
+ endedBy: number;
71
+ /**
72
+ * Timestamp when this medical product was ended
73
+ */
74
+ endedOn: Date;
75
+ /**
76
+ * Company product relation
77
+ */
78
+ product: Promise<CompanyProductEntity>;
79
+ /**
80
+ * Driving category relation
81
+ * Some medical examinations are associated with driving categories
82
+ * Example:
83
+ * * Category A: Vision Test, Hearing Test, Reaction Time Test, etc.
84
+ * * Category B: Physical Examination, Cardiovascular Assessment, etc.
85
+ */
86
+ category: Promise<DrivingCategoryEntity>;
87
+ /**
88
+ * Company medical examination appointments
89
+ * All examinations are offered via appointments and scheduled as flexible appointment
90
+ */
91
+ examinations: Promise<CompanyMedicalExaminationEntity[]>;
92
+ constructor(props?: Partial<CompanyMedicalProductEntity>);
93
+ toModel(): MedicalProduct;
94
+ toSummary(): MedicalProduct;
95
+ canPurchase(): Promise<boolean>;
96
+ getAddon(type: AddonType): AddonUsage;
97
+ getAddons(): AddonUsage[];
98
+ getActivities(): Promise<Activity[]>;
99
+ }
@@ -0,0 +1,270 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CompanyMedicalProductEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const common_1 = require("@driveup/common");
15
+ const common_2 = require("@driveup/common");
16
+ const product_entity_1 = require("../product/product.entity");
17
+ const category_entity_1 = require("../../../system/driving/category.entity");
18
+ const examination_entity_1 = require("./examination.entity");
19
+ const utils_1 = require("../../../utils");
20
+ let CompanyMedicalProductEntity = class CompanyMedicalProductEntity extends utils_1.TrackableEntity {
21
+ /**
22
+ * Company medical product
23
+ * Allow only medical products
24
+ */
25
+ productId;
26
+ /**
27
+ * Driveup driving catregory
28
+ * Optionally, if examination is category specific
29
+ */
30
+ categoryId;
31
+ /**
32
+ * Allow booking only if the examination is active
33
+ */
34
+ status;
35
+ /**
36
+ * Examination name
37
+ * (e.g. Eye Test, etc..)
38
+ */
39
+ title;
40
+ /**
41
+ * Company training description
42
+ */
43
+ description;
44
+ /**
45
+ * Promotion image URL for search engine visibility
46
+ */
47
+ imageUrl;
48
+ /**
49
+ * Collection of images for the medical product gallery
50
+ */
51
+ gallery;
52
+ /**
53
+ * List of authorized examiners for this medical product
54
+ */
55
+ examiners;
56
+ /**
57
+ * Price for the medical examination
58
+ */
59
+ price;
60
+ /**
61
+ * Duration of the medical examination in minutes
62
+ */
63
+ duration;
64
+ /**
65
+ * Physical location where the medical examination takes place
66
+ */
67
+ location;
68
+ /**
69
+ * Activate addons for this course
70
+ */
71
+ addons;
72
+ /**
73
+ * ID of the user who published this medical product
74
+ */
75
+ publishedBy;
76
+ /**
77
+ * Timestamp when this medical product was published
78
+ */
79
+ publishedOn;
80
+ /**
81
+ * ID of the user who ended this medical product
82
+ */
83
+ endedBy;
84
+ /**
85
+ * Timestamp when this medical product was ended
86
+ */
87
+ endedOn;
88
+ /**
89
+ * Company product relation
90
+ */
91
+ product;
92
+ /**
93
+ * Driving category relation
94
+ * Some medical examinations are associated with driving categories
95
+ * Example:
96
+ * * Category A: Vision Test, Hearing Test, Reaction Time Test, etc.
97
+ * * Category B: Physical Examination, Cardiovascular Assessment, etc.
98
+ */
99
+ category;
100
+ /**
101
+ * Company medical examination appointments
102
+ * All examinations are offered via appointments and scheduled as flexible appointment
103
+ */
104
+ examinations;
105
+ constructor(props) {
106
+ super();
107
+ Object.assign(this, props);
108
+ }
109
+ toModel() {
110
+ return new common_2.MedicalProduct({
111
+ id: this.id,
112
+ status: this.status,
113
+ title: this.title,
114
+ description: this.description,
115
+ imageUrl: this.imageUrl,
116
+ gallery: this.gallery?.map(common_2.Picture.toInstance) || null,
117
+ examiners: this.examiners?.map(common_2.Person.toInstance) || null,
118
+ price: this.price,
119
+ duration: this.duration,
120
+ location: this.location ? common_1.Address.toInstance(this.location) : null,
121
+ addons: this.addons?.map(common_1.AddonUsage.toInstance) || null,
122
+ });
123
+ }
124
+ toSummary() {
125
+ return this.toModel();
126
+ }
127
+ async canPurchase() {
128
+ if (this.status !== common_2.ProductStatus.Active)
129
+ return;
130
+ const product = await this.product;
131
+ return product.canPurchase();
132
+ }
133
+ getAddon(type) {
134
+ const addon = this.addons.find(a => a.type === type);
135
+ if (!addon)
136
+ return null;
137
+ return common_1.AddonUsage.toInstance(addon);
138
+ }
139
+ getAddons() {
140
+ return this.addons?.map(common_1.AddonUsage.toInstance);
141
+ }
142
+ async getActivities() {
143
+ const activities = [];
144
+ activities.push(await (0, utils_1.toActivity)(this.createdBy, common_1.ActivityType.createdBy));
145
+ activities.push(await (0, utils_1.toActivity)(this.createdOn, common_1.ActivityType.createdOn));
146
+ activities.push(await (0, utils_1.toActivity)(this.updatedBy, common_1.ActivityType.updatedBy));
147
+ activities.push(await (0, utils_1.toActivity)(this.updatedOn, common_1.ActivityType.updatedOn));
148
+ return activities.filter(a => a);
149
+ }
150
+ };
151
+ exports.CompanyMedicalProductEntity = CompanyMedicalProductEntity;
152
+ __decorate([
153
+ (0, typeorm_1.Column)(),
154
+ __metadata("design:type", Number)
155
+ ], CompanyMedicalProductEntity.prototype, "productId", void 0);
156
+ __decorate([
157
+ (0, typeorm_1.Column)({
158
+ nullable: true,
159
+ default: null
160
+ }),
161
+ __metadata("design:type", Number)
162
+ ], CompanyMedicalProductEntity.prototype, "categoryId", void 0);
163
+ __decorate([
164
+ (0, typeorm_1.Column)({
165
+ type: 'enum',
166
+ enum: common_2.ProductStatus,
167
+ default: common_2.ProductStatus.Inactive,
168
+ nullable: false
169
+ }),
170
+ __metadata("design:type", String)
171
+ ], CompanyMedicalProductEntity.prototype, "status", void 0);
172
+ __decorate([
173
+ (0, typeorm_1.Column)(),
174
+ __metadata("design:type", String)
175
+ ], CompanyMedicalProductEntity.prototype, "title", void 0);
176
+ __decorate([
177
+ (0, typeorm_1.Column)({
178
+ nullable: true,
179
+ default: null
180
+ }),
181
+ __metadata("design:type", String)
182
+ ], CompanyMedicalProductEntity.prototype, "description", void 0);
183
+ __decorate([
184
+ (0, typeorm_1.Column)({
185
+ nullable: true,
186
+ default: null
187
+ }),
188
+ __metadata("design:type", String)
189
+ ], CompanyMedicalProductEntity.prototype, "imageUrl", void 0);
190
+ __decorate([
191
+ (0, typeorm_1.Column)({
192
+ type: 'simple-json',
193
+ nullable: true,
194
+ default: null
195
+ }),
196
+ __metadata("design:type", Array)
197
+ ], CompanyMedicalProductEntity.prototype, "gallery", void 0);
198
+ __decorate([
199
+ (0, typeorm_1.Column)({
200
+ type: 'simple-json',
201
+ nullable: true,
202
+ default: null
203
+ }),
204
+ __metadata("design:type", Array)
205
+ ], CompanyMedicalProductEntity.prototype, "examiners", void 0);
206
+ __decorate([
207
+ (0, typeorm_1.Column)({
208
+ type: 'decimal',
209
+ precision: 8,
210
+ scale: 2,
211
+ nullable: true,
212
+ default: null
213
+ }),
214
+ __metadata("design:type", Number)
215
+ ], CompanyMedicalProductEntity.prototype, "price", void 0);
216
+ __decorate([
217
+ (0, typeorm_1.Column)({
218
+ nullable: true,
219
+ default: null
220
+ }),
221
+ __metadata("design:type", Number)
222
+ ], CompanyMedicalProductEntity.prototype, "duration", void 0);
223
+ __decorate([
224
+ (0, typeorm_1.Column)({
225
+ nullable: true,
226
+ default: null
227
+ }),
228
+ __metadata("design:type", common_1.Address)
229
+ ], CompanyMedicalProductEntity.prototype, "location", void 0);
230
+ __decorate([
231
+ (0, typeorm_1.Column)({
232
+ type: 'simple-json',
233
+ nullable: true,
234
+ default: null
235
+ }),
236
+ __metadata("design:type", Array)
237
+ ], CompanyMedicalProductEntity.prototype, "addons", void 0);
238
+ __decorate([
239
+ (0, typeorm_1.Column)({ nullable: true, default: null }),
240
+ __metadata("design:type", Number)
241
+ ], CompanyMedicalProductEntity.prototype, "publishedBy", void 0);
242
+ __decorate([
243
+ (0, typeorm_1.Column)({ nullable: true, default: null }),
244
+ __metadata("design:type", Date)
245
+ ], CompanyMedicalProductEntity.prototype, "publishedOn", void 0);
246
+ __decorate([
247
+ (0, typeorm_1.Column)({ nullable: true, default: null }),
248
+ __metadata("design:type", Number)
249
+ ], CompanyMedicalProductEntity.prototype, "endedBy", void 0);
250
+ __decorate([
251
+ (0, typeorm_1.Column)({ nullable: true, default: null }),
252
+ __metadata("design:type", Date)
253
+ ], CompanyMedicalProductEntity.prototype, "endedOn", void 0);
254
+ __decorate([
255
+ (0, typeorm_1.ManyToOne)(() => product_entity_1.CompanyProductEntity, product => product.medical),
256
+ __metadata("design:type", Promise)
257
+ ], CompanyMedicalProductEntity.prototype, "product", void 0);
258
+ __decorate([
259
+ (0, typeorm_1.ManyToOne)(() => category_entity_1.DrivingCategoryEntity, category => category.companyMedicalProducts),
260
+ __metadata("design:type", Promise)
261
+ ], CompanyMedicalProductEntity.prototype, "category", void 0);
262
+ __decorate([
263
+ (0, typeorm_1.OneToMany)(() => examination_entity_1.CompanyMedicalExaminationEntity, examination => examination.medicalProduct),
264
+ __metadata("design:type", Promise)
265
+ ], CompanyMedicalProductEntity.prototype, "examinations", void 0);
266
+ exports.CompanyMedicalProductEntity = CompanyMedicalProductEntity = __decorate([
267
+ (0, typeorm_1.Entity)('companyMedicalProducts'),
268
+ __metadata("design:paramtypes", [Object])
269
+ ], CompanyMedicalProductEntity);
270
+ //# sourceMappingURL=product.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product.entity.js","sourceRoot":"","sources":["../../../../src/profile/company/medical/product.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA+D;AAC/D,4CAAyF;AACzF,4CAAiF;AACjF,8DAAiE;AACjE,6EAAgF;AAChF,6DAAuE;AACvE,0CAA6D;AAGtD,IAAM,2BAA2B,GAAjC,MAAM,2BAA4B,SAAQ,uBAA+B;IAE/E;;;OAGG;IAEH,SAAS,CAAS;IAElB;;;OAGG;IAKH,UAAU,CAAS;IAEnB;;OAEG;IAOH,MAAM,CAAgB;IAEtB;;;OAGG;IAEH,KAAK,CAAS;IAEd;;OAEG;IAKH,WAAW,CAAS;IAEpB;;OAEG;IAKH,QAAQ,CAAS;IAEjB;;OAEG;IAMH,OAAO,CAAY;IAEnB;;OAEG;IAMH,SAAS,CAAW;I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nB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;2DACmB;AAMrB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;gEACtB;AAMpB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BAC7B,IAAI;gEAAC;AAMlB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;4DAC1B;AAMhB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BACjC,IAAI;4DAAC;AAMd;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAoB,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;;4DAC3B;AAUvC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAqB,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;;6DAC3C;AAOzC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oDAA+B,EAAE,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,cAAc,CAAC;;iEACnC;sCAhK7C,2BAA2B;IADvC,IAAA,gBAAM,EAAC,wBAAwB,CAAC;;GACpB,2BAA2B,CAmNvC"}
@@ -0,0 +1,21 @@
1
+ export declare class CompanyMetric {
2
+ id: number;
3
+ name: string;
4
+ drivingTraining: {
5
+ active: number;
6
+ completed: number;
7
+ terminated: number;
8
+ total: number;
9
+ };
10
+ courseTraining: {
11
+ active: number;
12
+ completed: number;
13
+ terminated: number;
14
+ total: number;
15
+ };
16
+ billing: {
17
+ revenue: number;
18
+ paid: number;
19
+ unpaid: number;
20
+ };
21
+ }