@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 @@
1
+ {"version":3,"file":"priceplan.entity.js","sourceRoot":"","sources":["../../../../src/profile/company/product/priceplan.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA0E;AAC1E,4CAA8E;AAC9E,qDAAwD;AACxD,gFAAmF;AACnF,qEAA+E;AAC/E,0CAA6D;AAGtD,IAAM,6BAA6B,GAAnC,MAAM,6BAA8B,SAAQ,uBAA0B;IAE5E;;OAEG;IAEH,SAAS,CAAS;IAElB;;OAEG;IAEH,WAAW,CAAS;IAMpB,eAAe,CAAS;IAExB;;;OAGG;IAQH,KAAK,CAAS;IAEd;;;;OAIG;IAQH,WAAW,CAAS;IAEpB;;;OAGG;IAKH,YAAY,CAAS;IAErB;;OAEG;IAKH,UAAU,CAAO;IAEjB;;OAEG;IAEH,OAAO,CAAgC;IAEvC;;OAEG;IAEH,SAAS,CAAkC;IAE3C;;OAEG;IAEH,gBAAgB,CAAgC;IAEhD;;OAEG;IAGH,aAAa,CAAsC;IAEnD,YAAY,KAA8C;QACzD,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,IAAe;QAC5B,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC;QAC9C,MAAM,SAAS,GAAG,MAAM,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACvD,SAAS,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QACvB,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,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BAA6B,CA6HzC"}
@@ -0,0 +1,171 @@
1
+ import { ProductStatus, Activity, Product } from '@driveup/common';
2
+ import { CompanyEntity } from '../company.entity';
3
+ import { ProductCountryEntity } from '../../../catalog/product/country.entity';
4
+ import { CompanyProductPricePlanEntity } from './priceplan.entity';
5
+ import { CompanyCourseEntity } from '../course/course.entity';
6
+ import { CompanyProductVehicleEntity } from './vehicle.entity';
7
+ import { CompanyMedicalProductEntity } from '../medical/product.entity';
8
+ import { CompanyProductAddonEntity } from './addon.entity';
9
+ import { TrackableEntity } from '../../../utils';
10
+ export declare class CompanyProductEntity extends TrackableEntity<Product> {
11
+ /**
12
+ * Reference to the company that owns this product
13
+ */
14
+ companyId: number;
15
+ /**
16
+ * Driveup country product
17
+ */
18
+ productId: number;
19
+ /**
20
+ * Company product status
21
+ * Examples: Active, Inactive, Suspended, Archived
22
+ */
23
+ status: ProductStatus;
24
+ /**
25
+ * Company product name
26
+ */
27
+ title: string;
28
+ /**
29
+ * Company product description
30
+ */
31
+ description: string;
32
+ /**
33
+ * Company product price for B2C
34
+ */
35
+ price: number;
36
+ /**
37
+ * Product credit for B2C
38
+ */
39
+ credit: number;
40
+ /**
41
+ * Indicates if start credit has been used
42
+ */
43
+ startCreditUsed: boolean;
44
+ /**
45
+ * Product free benefits allowed
46
+ * Suspision of free benefits
47
+ * Based on busniess requirements and number of switches to free plan
48
+ * product can be suspended from free benefits
49
+ * Suspending its mean the company doesn't get free benefits of the free plan at the beginning of each month
50
+ */
51
+ freeBenefitsAllowed: boolean;
52
+ /**
53
+ * Track changes to free plan dates
54
+ * On moving "to" free plan, we first push the current date to this array,
55
+ * and then we count the number of dates in this array within the start and end of "current year"
56
+ * if the number is 3, we disable free benefits for the company forever (freeBenefitsAllowed = false)
57
+ */
58
+ changesToFreePlan: Date[];
59
+ /**
60
+ * Company product enabled state
61
+ * Managed by driveup console
62
+ * Indicates if the product is currently enabled for the company
63
+ * Used to quickly enable/disable the product for the company
64
+ * When product is disabled, all activities are also disabled
65
+ * and company can't use the product features
66
+ */
67
+ enabled: boolean;
68
+ /**
69
+ * ID of the user who activated this product
70
+ */
71
+ activatedBy: number;
72
+ /**
73
+ * Timestamp when this product was activated
74
+ */
75
+ activatedOn: Date;
76
+ /**
77
+ * Timestamp when this product was deactivated
78
+ */
79
+ deactivatedOn: Date;
80
+ /**
81
+ * ID of the user who deactivated this product
82
+ */
83
+ deactivatedBy: number;
84
+ /**
85
+ * Timestamp when this product was enabled
86
+ */
87
+ enabledOn: Date;
88
+ /**
89
+ * ID of the user who enabled this product
90
+ */
91
+ enabledBy: number;
92
+ /**
93
+ * Timestamp when this product was disabled
94
+ */
95
+ disabledOn: Date;
96
+ /**
97
+ * ID of the user who disabled this product
98
+ */
99
+ disabledBy: number;
100
+ /**
101
+ * Timestamp when this product was suspended
102
+ */
103
+ suspendedOn: Date;
104
+ /**
105
+ * ID of the user who suspended this product
106
+ */
107
+ suspendedBy: number;
108
+ /**
109
+ * Timestamp when this product was blocked
110
+ */
111
+ blockedOn: Date;
112
+ /**
113
+ * ID of the user who blocked this product
114
+ */
115
+ blockedBy: number;
116
+ /**
117
+ * Company relation
118
+ */
119
+ company: Promise<CompanyEntity>;
120
+ /**
121
+ * Driveup product country relation
122
+ */
123
+ product: Promise<ProductCountryEntity>;
124
+ /**
125
+ * All product price plans
126
+ * The company can switch any time between different price plans
127
+ */
128
+ pricePlans: Promise<CompanyProductPricePlanEntity>;
129
+ /**
130
+ * Current price plan
131
+ * The active price plan for the company product
132
+ */
133
+ pricePlan: Promise<CompanyProductPricePlanEntity>;
134
+ /**
135
+ * Company product addons
136
+ * Addons are additional features or services that can be added to the main product
137
+ */
138
+ addons: Promise<CompanyProductAddonEntity[]>;
139
+ /**
140
+ * Medical products
141
+ * Company offers medical examination products to its students
142
+ * * Eye Test: Vision Acuity Test, Color Blindness Test, Depth Perception Test, etc.
143
+ * * Hearing Test: Audiometry Test, Tympanometry Test, Speech Recognition Test, etc.
144
+ * * Physical Exam: Blood Pressure Measurement, Reflex Test, Range of Motion Test, etc.
145
+ * * Drug and Alcohol Test: Urine Test, Breathalyzer Test, Hair Follicle Test, etc.
146
+ * * General Health Screening: Blood Test, Cholesterol Test, Diabetes Screening, etc.
147
+ */
148
+ medical: Promise<CompanyMedicalProductEntity[]>;
149
+ /**
150
+ * Company tranings products
151
+ * Company offers course products to its students
152
+ * * First Aid: Fundamentals of Emergency Response, Patient Assessment, etc.
153
+ * * Category B: Vehicle Familiarization, Basic Maneuvers, Traffic Laws, etc.
154
+ * * Category C: Heavy Vehicle Operation, Load Management, Safety Regulations, etc.
155
+ */
156
+ courses: Promise<CompanyCourseEntity[]>;
157
+ /**
158
+ * Company vehicles products
159
+ * Company offers vehicle products to its students
160
+ * * Car: Sedan, Hatchback, SUV, etc.
161
+ * * Motorcycle: Standard, Cruiser, Sportbike, etc.
162
+ * * Truck: Light Truck, Heavy Truck, Pickup Truck, etc.
163
+ */
164
+ vehicles: Promise<CompanyProductVehicleEntity[]>;
165
+ constructor(props?: Partial<CompanyProductEntity>);
166
+ toModel(): Promise<Product>;
167
+ toSummary(): Promise<Product>;
168
+ getVehicles(): Promise<import("@driveup/common").Vehicle[]>;
169
+ canPurchase(): boolean;
170
+ getActivities(): Promise<Activity[]>;
171
+ }
@@ -0,0 +1,383 @@
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.CompanyProductEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const common_1 = require("@driveup/common");
15
+ const staff_entity_1 = require("../../../system/staff/staff.entity");
16
+ const company_entity_1 = require("../company.entity");
17
+ const country_entity_1 = require("../../../catalog/product/country.entity");
18
+ const priceplan_entity_1 = require("./priceplan.entity");
19
+ const course_entity_1 = require("../course/course.entity");
20
+ const vehicle_entity_1 = require("./vehicle.entity");
21
+ const product_entity_1 = require("../medical/product.entity");
22
+ const addon_entity_1 = require("./addon.entity");
23
+ const utils_1 = require("../../../utils");
24
+ let CompanyProductEntity = class CompanyProductEntity extends utils_1.TrackableEntity {
25
+ /**
26
+ * Reference to the company that owns this product
27
+ */
28
+ companyId;
29
+ /**
30
+ * Driveup country product
31
+ */
32
+ productId;
33
+ /**
34
+ * Company product status
35
+ * Examples: Active, Inactive, Suspended, Archived
36
+ */
37
+ status;
38
+ /**
39
+ * Company product name
40
+ */
41
+ title;
42
+ /**
43
+ * Company product description
44
+ */
45
+ description;
46
+ /**
47
+ * Company product price for B2C
48
+ */
49
+ price;
50
+ /**
51
+ * Product credit for B2C
52
+ */
53
+ credit;
54
+ /**
55
+ * Indicates if start credit has been used
56
+ */
57
+ startCreditUsed;
58
+ /**
59
+ * Product free benefits allowed
60
+ * Suspision of free benefits
61
+ * Based on busniess requirements and number of switches to free plan
62
+ * product can be suspended from free benefits
63
+ * Suspending its mean the company doesn't get free benefits of the free plan at the beginning of each month
64
+ */
65
+ freeBenefitsAllowed;
66
+ /**
67
+ * Track changes to free plan dates
68
+ * On moving "to" free plan, we first push the current date to this array,
69
+ * and then we count the number of dates in this array within the start and end of "current year"
70
+ * if the number is 3, we disable free benefits for the company forever (freeBenefitsAllowed = false)
71
+ */
72
+ changesToFreePlan;
73
+ /**
74
+ * Company product enabled state
75
+ * Managed by driveup console
76
+ * Indicates if the product is currently enabled for the company
77
+ * Used to quickly enable/disable the product for the company
78
+ * When product is disabled, all activities are also disabled
79
+ * and company can't use the product features
80
+ */
81
+ enabled;
82
+ /**
83
+ * ID of the user who activated this product
84
+ */
85
+ activatedBy;
86
+ /**
87
+ * Timestamp when this product was activated
88
+ */
89
+ activatedOn;
90
+ /**
91
+ * Timestamp when this product was deactivated
92
+ */
93
+ deactivatedOn;
94
+ /**
95
+ * ID of the user who deactivated this product
96
+ */
97
+ deactivatedBy;
98
+ /**
99
+ * Timestamp when this product was enabled
100
+ */
101
+ enabledOn;
102
+ /**
103
+ * ID of the user who enabled this product
104
+ */
105
+ enabledBy;
106
+ /**
107
+ * Timestamp when this product was disabled
108
+ */
109
+ disabledOn;
110
+ /**
111
+ * ID of the user who disabled this product
112
+ */
113
+ disabledBy;
114
+ /**
115
+ * Timestamp when this product was suspended
116
+ */
117
+ suspendedOn;
118
+ /**
119
+ * ID of the user who suspended this product
120
+ */
121
+ suspendedBy;
122
+ /**
123
+ * Timestamp when this product was blocked
124
+ */
125
+ blockedOn;
126
+ /**
127
+ * ID of the user who blocked this product
128
+ */
129
+ blockedBy;
130
+ /**
131
+ * Company relation
132
+ */
133
+ company;
134
+ /**
135
+ * Driveup product country relation
136
+ */
137
+ product;
138
+ /**
139
+ * All product price plans
140
+ * The company can switch any time between different price plans
141
+ */
142
+ pricePlans;
143
+ /**
144
+ * Current price plan
145
+ * The active price plan for the company product
146
+ */
147
+ pricePlan;
148
+ /**
149
+ * Company product addons
150
+ * Addons are additional features or services that can be added to the main product
151
+ */
152
+ addons;
153
+ /**
154
+ * Medical products
155
+ * Company offers medical examination products to its students
156
+ * * Eye Test: Vision Acuity Test, Color Blindness Test, Depth Perception Test, etc.
157
+ * * Hearing Test: Audiometry Test, Tympanometry Test, Speech Recognition Test, etc.
158
+ * * Physical Exam: Blood Pressure Measurement, Reflex Test, Range of Motion Test, etc.
159
+ * * Drug and Alcohol Test: Urine Test, Breathalyzer Test, Hair Follicle Test, etc.
160
+ * * General Health Screening: Blood Test, Cholesterol Test, Diabetes Screening, etc.
161
+ */
162
+ medical;
163
+ /**
164
+ * Company tranings products
165
+ * Company offers course products to its students
166
+ * * First Aid: Fundamentals of Emergency Response, Patient Assessment, etc.
167
+ * * Category B: Vehicle Familiarization, Basic Maneuvers, Traffic Laws, etc.
168
+ * * Category C: Heavy Vehicle Operation, Load Management, Safety Regulations, etc.
169
+ */
170
+ courses;
171
+ /**
172
+ * Company vehicles products
173
+ * Company offers vehicle products to its students
174
+ * * Car: Sedan, Hatchback, SUV, etc.
175
+ * * Motorcycle: Standard, Cruiser, Sportbike, etc.
176
+ * * Truck: Light Truck, Heavy Truck, Pickup Truck, etc.
177
+ */
178
+ vehicles;
179
+ constructor(props) {
180
+ super();
181
+ Object.assign(this, props);
182
+ }
183
+ async toModel() {
184
+ const productCountry = await this.product;
185
+ const product = await productCountry.toModel();
186
+ product.id = this.id;
187
+ product.status = this.status;
188
+ product.title = this.title || product.title;
189
+ product.description = this.description || product.description;
190
+ product.price = this.price;
191
+ product.credit = this.credit;
192
+ product.startCreditUsed = this.startCreditUsed;
193
+ product.freeBenefitsAllowed = this.freeBenefitsAllowed;
194
+ return product;
195
+ }
196
+ async toSummary() {
197
+ return await this.toModel();
198
+ }
199
+ async getVehicles() {
200
+ const vehicles = await this.vehicles;
201
+ return Promise.all(vehicles.map(v => v.toModel()));
202
+ }
203
+ canPurchase() {
204
+ return this.status === common_1.ProductStatus.Active;
205
+ }
206
+ async getActivities() {
207
+ const activities = [];
208
+ activities.push(await (0, utils_1.toActivity)(this.createdBy, common_1.ActivityType.createdBy));
209
+ activities.push(await (0, utils_1.toActivity)(this.createdOn, common_1.ActivityType.createdOn));
210
+ activities.push(await (0, utils_1.toActivity)(this.updatedBy, common_1.ActivityType.updatedBy));
211
+ activities.push(await (0, utils_1.toActivity)(this.updatedOn, common_1.ActivityType.updatedOn));
212
+ activities.push(await (0, utils_1.toActivity)(this.activatedBy, common_1.ActivityType.activatedBy));
213
+ activities.push(await (0, utils_1.toActivity)(this.activatedOn, common_1.ActivityType.activatedOn));
214
+ activities.push(await (0, utils_1.toActivity)(this.deactivatedBy, common_1.ActivityType.deactivatedBy));
215
+ activities.push(await (0, utils_1.toActivity)(this.deactivatedOn, common_1.ActivityType.deactivatedOn));
216
+ activities.push(await (0, utils_1.toActivity)(this.enabledBy, common_1.ActivityType.enabledBy, staff_entity_1.StaffEntity));
217
+ activities.push(await (0, utils_1.toActivity)(this.enabledOn, common_1.ActivityType.createdOn));
218
+ activities.push(await (0, utils_1.toActivity)(this.disabledBy, common_1.ActivityType.disabledBy, staff_entity_1.StaffEntity));
219
+ activities.push(await (0, utils_1.toActivity)(this.disabledOn, common_1.ActivityType.disabledOn));
220
+ return activities.filter(a => a);
221
+ }
222
+ };
223
+ exports.CompanyProductEntity = CompanyProductEntity;
224
+ __decorate([
225
+ (0, typeorm_1.Column)(),
226
+ __metadata("design:type", Number)
227
+ ], CompanyProductEntity.prototype, "companyId", void 0);
228
+ __decorate([
229
+ (0, typeorm_1.Column)(),
230
+ __metadata("design:type", Number)
231
+ ], CompanyProductEntity.prototype, "productId", void 0);
232
+ __decorate([
233
+ (0, typeorm_1.Column)({
234
+ type: 'enum',
235
+ enum: common_1.ProductStatus,
236
+ default: common_1.ProductStatus.Active,
237
+ nullable: false
238
+ }),
239
+ __metadata("design:type", String)
240
+ ], CompanyProductEntity.prototype, "status", void 0);
241
+ __decorate([
242
+ (0, typeorm_1.Column)(),
243
+ __metadata("design:type", String)
244
+ ], CompanyProductEntity.prototype, "title", void 0);
245
+ __decorate([
246
+ (0, typeorm_1.Column)({
247
+ nullable: true,
248
+ default: null
249
+ }),
250
+ __metadata("design:type", String)
251
+ ], CompanyProductEntity.prototype, "description", void 0);
252
+ __decorate([
253
+ (0, typeorm_1.Column)({
254
+ type: 'decimal',
255
+ precision: 8,
256
+ scale: 2,
257
+ nullable: true,
258
+ default: null
259
+ }),
260
+ __metadata("design:type", Number)
261
+ ], CompanyProductEntity.prototype, "price", void 0);
262
+ __decorate([
263
+ (0, typeorm_1.Column)({
264
+ type: 'decimal',
265
+ precision: 8,
266
+ scale: 2,
267
+ nullable: true,
268
+ default: null
269
+ }),
270
+ __metadata("design:type", Number)
271
+ ], CompanyProductEntity.prototype, "credit", void 0);
272
+ __decorate([
273
+ (0, typeorm_1.Column)({
274
+ nullable: true,
275
+ default: null
276
+ }),
277
+ __metadata("design:type", Boolean)
278
+ ], CompanyProductEntity.prototype, "startCreditUsed", void 0);
279
+ __decorate([
280
+ (0, typeorm_1.Column)({ default: true }),
281
+ __metadata("design:type", Boolean)
282
+ ], CompanyProductEntity.prototype, "freeBenefitsAllowed", void 0);
283
+ __decorate([
284
+ (0, typeorm_1.Column)({
285
+ type: 'simple-json',
286
+ nullable: true,
287
+ default: null
288
+ }),
289
+ __metadata("design:type", Array)
290
+ ], CompanyProductEntity.prototype, "changesToFreePlan", void 0);
291
+ __decorate([
292
+ (0, typeorm_1.Column)({
293
+ nullable: false,
294
+ default: true
295
+ }),
296
+ __metadata("design:type", Boolean)
297
+ ], CompanyProductEntity.prototype, "enabled", void 0);
298
+ __decorate([
299
+ (0, typeorm_1.Column)({ nullable: true, default: null }),
300
+ __metadata("design:type", Number)
301
+ ], CompanyProductEntity.prototype, "activatedBy", void 0);
302
+ __decorate([
303
+ (0, typeorm_1.Column)({ nullable: true, default: null }),
304
+ __metadata("design:type", Date)
305
+ ], CompanyProductEntity.prototype, "activatedOn", void 0);
306
+ __decorate([
307
+ (0, typeorm_1.Column)({ nullable: true, default: null }),
308
+ __metadata("design:type", Date)
309
+ ], CompanyProductEntity.prototype, "deactivatedOn", void 0);
310
+ __decorate([
311
+ (0, typeorm_1.Column)({ nullable: true, default: null }),
312
+ __metadata("design:type", Number)
313
+ ], CompanyProductEntity.prototype, "deactivatedBy", void 0);
314
+ __decorate([
315
+ (0, typeorm_1.Column)({ nullable: true, default: null }),
316
+ __metadata("design:type", Date)
317
+ ], CompanyProductEntity.prototype, "enabledOn", void 0);
318
+ __decorate([
319
+ (0, typeorm_1.Column)({ nullable: true, default: null }),
320
+ __metadata("design:type", Number)
321
+ ], CompanyProductEntity.prototype, "enabledBy", void 0);
322
+ __decorate([
323
+ (0, typeorm_1.Column)({ nullable: true, default: null }),
324
+ __metadata("design:type", Date)
325
+ ], CompanyProductEntity.prototype, "disabledOn", void 0);
326
+ __decorate([
327
+ (0, typeorm_1.Column)({ nullable: true, default: null }),
328
+ __metadata("design:type", Number)
329
+ ], CompanyProductEntity.prototype, "disabledBy", void 0);
330
+ __decorate([
331
+ (0, typeorm_1.Column)({ nullable: true, default: null }),
332
+ __metadata("design:type", Date)
333
+ ], CompanyProductEntity.prototype, "suspendedOn", void 0);
334
+ __decorate([
335
+ (0, typeorm_1.Column)({ nullable: true, default: null }),
336
+ __metadata("design:type", Number)
337
+ ], CompanyProductEntity.prototype, "suspendedBy", void 0);
338
+ __decorate([
339
+ (0, typeorm_1.Column)({ nullable: true, default: null }),
340
+ __metadata("design:type", Date)
341
+ ], CompanyProductEntity.prototype, "blockedOn", void 0);
342
+ __decorate([
343
+ (0, typeorm_1.Column)({ nullable: true, default: null }),
344
+ __metadata("design:type", Number)
345
+ ], CompanyProductEntity.prototype, "blockedBy", void 0);
346
+ __decorate([
347
+ (0, typeorm_1.ManyToOne)(() => company_entity_1.CompanyEntity, company => company.products),
348
+ __metadata("design:type", Promise)
349
+ ], CompanyProductEntity.prototype, "company", void 0);
350
+ __decorate([
351
+ (0, typeorm_1.ManyToOne)(() => country_entity_1.ProductCountryEntity, product => product.companies),
352
+ __metadata("design:type", Promise)
353
+ ], CompanyProductEntity.prototype, "product", void 0);
354
+ __decorate([
355
+ (0, typeorm_1.ManyToOne)(() => priceplan_entity_1.CompanyProductPricePlanEntity, plan => plan.product),
356
+ __metadata("design:type", Promise)
357
+ ], CompanyProductEntity.prototype, "pricePlans", void 0);
358
+ __decorate([
359
+ (0, typeorm_1.OneToOne)(() => priceplan_entity_1.CompanyProductPricePlanEntity, plan => plan.currentPricePlan),
360
+ (0, typeorm_1.JoinColumn)(),
361
+ __metadata("design:type", Promise)
362
+ ], CompanyProductEntity.prototype, "pricePlan", void 0);
363
+ __decorate([
364
+ (0, typeorm_1.OneToMany)(() => addon_entity_1.CompanyProductAddonEntity, addon => addon.company),
365
+ __metadata("design:type", Promise)
366
+ ], CompanyProductEntity.prototype, "addons", void 0);
367
+ __decorate([
368
+ (0, typeorm_1.OneToMany)(() => product_entity_1.CompanyMedicalProductEntity, course => course.product),
369
+ __metadata("design:type", Promise)
370
+ ], CompanyProductEntity.prototype, "medical", void 0);
371
+ __decorate([
372
+ (0, typeorm_1.OneToMany)(() => course_entity_1.CompanyCourseEntity, course => course.product),
373
+ __metadata("design:type", Promise)
374
+ ], CompanyProductEntity.prototype, "courses", void 0);
375
+ __decorate([
376
+ (0, typeorm_1.OneToMany)(() => vehicle_entity_1.CompanyProductVehicleEntity, course => course.product),
377
+ __metadata("design:type", Promise)
378
+ ], CompanyProductEntity.prototype, "vehicles", void 0);
379
+ exports.CompanyProductEntity = CompanyProductEntity = __decorate([
380
+ (0, typeorm_1.Entity)('companyProducts'),
381
+ __metadata("design:paramtypes", [Object])
382
+ ], CompanyProductEntity);
383
+ //# sourceMappingURL=product.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product.entity.js","sourceRoot":"","sources":["../../../../src/profile/company/product/product.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAqF;AACrF,4CAA8F;AAC9F,qEAAiE;AACjE,sDAAkD;AAClD,4EAA+E;AAC/E,yDAAmE;AACnE,2DAA8D;AAC9D,qDAA+D;AAC/D,8DAAwE;AACxE,iDAA2D;AAC3D,0CAA6D;AAGtD,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,uBAAwB;IAEjE;;OAEG;IAEH,SAAS,CAAS;IAElB;;OAEG;IAEH,SAAS,CAAS;IAElB;;;OAGG;IAOH,MAAM,CAAgB;IAEtB;;OAEG;IAEH,KAAK,CAAS;IAEd;;OAEG;IAKH,WAAW,CAAS;IAE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,CAAC;;qDAC5B;AAMhC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAoB,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC;;qDAC7B;AAOvC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,gDAA6B,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;;wDAClB;AAQnD;IAFC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,gDAA6B,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC;IAC5E,IAAA,oBAAU,GAAE;;uDACqC;AAOlD;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wCAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;;oDACtB;AAY7C;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,4CAA2B,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC;;qDACvB;AAUhD;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,mCAAmB,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC;;qDACvB;AAUxC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,4CAA2B,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC;;sDACtB;+BAvPrC,oBAAoB;IADhC,IAAA,gBAAM,EAAC,iBAAiB,CAAC;;GACb,oBAAoB,CAyShC"}
@@ -0,0 +1,46 @@
1
+ import { Activity, CarTransmission, Vehicle } from '@driveup/common';
2
+ import { CompanyProductEntity } from './product.entity';
3
+ import { TrackableEntity } from '../../../utils';
4
+ export declare class CompanyProductVehicleEntity extends TrackableEntity<Vehicle> {
5
+ /**
6
+ * Reference to the company product this vehicle belongs to
7
+ */
8
+ productId: string;
9
+ /**
10
+ * Vehicle license plate
11
+ */
12
+ licensePlate: string;
13
+ /**
14
+ * Vehicle number used in driving school
15
+ */
16
+ number: string;
17
+ /**
18
+ * Vehicle make (e.g. Toyota, Ford)
19
+ */
20
+ make: string;
21
+ /**
22
+ * Vehicle model (e.g. Corolla, Focus)
23
+ */
24
+ model: string;
25
+ /**
26
+ * Vehicle manufacturing year
27
+ */
28
+ year: number;
29
+ /**
30
+ * URL to an image of the vehicle
31
+ */
32
+ imageUrl: string;
33
+ /**
34
+ * Type of transmission (Automatic or Manual)
35
+ * @default CarTransmission.Automatic
36
+ */
37
+ transmission: CarTransmission.Automatic;
38
+ /**
39
+ * Reference to the company product this vehicle is used for
40
+ */
41
+ product: Promise<CompanyProductEntity>;
42
+ constructor(props?: Partial<CompanyProductVehicleEntity>);
43
+ toModel(): Vehicle;
44
+ toSummary(): Vehicle;
45
+ getActivities(): Promise<Activity[]>;
46
+ }