@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.
- package/README.md +174 -0
- package/lib/catalog/addon/addon.entity.d.ts +109 -0
- package/lib/catalog/addon/addon.entity.js +260 -0
- package/lib/catalog/addon/addon.entity.js.map +1 -0
- package/lib/catalog/addon/country.entity.d.ts +112 -0
- package/lib/catalog/addon/country.entity.js +246 -0
- package/lib/catalog/addon/country.entity.js.map +1 -0
- package/lib/catalog/driving/category.entity.d.ts +122 -0
- package/lib/catalog/driving/category.entity.js +217 -0
- package/lib/catalog/driving/category.entity.js.map +1 -0
- package/lib/catalog/driving/vehicle.entity.d.ts +49 -0
- package/lib/catalog/driving/vehicle.entity.js +97 -0
- package/lib/catalog/driving/vehicle.entity.js.map +1 -0
- package/lib/catalog/priceplan/priceplan.entity.d.ts +123 -0
- package/lib/catalog/priceplan/priceplan.entity.js +288 -0
- package/lib/catalog/priceplan/priceplan.entity.js.map +1 -0
- package/lib/catalog/product/country.entity.d.ts +109 -0
- package/lib/catalog/product/country.entity.js +233 -0
- package/lib/catalog/product/country.entity.js.map +1 -0
- package/lib/catalog/product/priceplan.entity.d.ts +113 -0
- package/lib/catalog/product/priceplan.entity.js +251 -0
- package/lib/catalog/product/priceplan.entity.js.map +1 -0
- package/lib/catalog/product/product.entity.d.ts +104 -0
- package/lib/catalog/product/product.entity.js +262 -0
- package/lib/catalog/product/product.entity.js.map +1 -0
- package/lib/catalog/program/program.entity.d.ts +107 -0
- package/lib/catalog/program/program.entity.js +247 -0
- package/lib/catalog/program/program.entity.js.map +1 -0
- package/lib/catalog/seed/assets/asset.entity.d.ts +68 -0
- package/lib/catalog/seed/assets/asset.entity.js +163 -0
- package/lib/catalog/seed/assets/asset.entity.js.map +1 -0
- package/lib/catalog/seed/courses/course.entity.d.ts +98 -0
- package/lib/catalog/seed/courses/course.entity.js +216 -0
- package/lib/catalog/seed/courses/course.entity.js.map +1 -0
- package/lib/catalog/seed/courses/lesson.entity.d.ts +90 -0
- package/lib/catalog/seed/courses/lesson.entity.js +214 -0
- package/lib/catalog/seed/courses/lesson.entity.js.map +1 -0
- package/lib/catalog/seed/courses/topic.entity.d.ts +77 -0
- package/lib/catalog/seed/courses/topic.entity.js +185 -0
- package/lib/catalog/seed/courses/topic.entity.js.map +1 -0
- package/lib/catalog/seed/expense/category.entity.d.ts +61 -0
- package/lib/catalog/seed/expense/category.entity.js +153 -0
- package/lib/catalog/seed/expense/category.entity.js.map +1 -0
- package/lib/index.d.ts +67 -0
- package/lib/index.js +89 -0
- package/lib/index.js.map +1 -0
- package/lib/profile/agent/agent.entity.d.ts +95 -0
- package/lib/profile/agent/agent.entity.js +223 -0
- package/lib/profile/agent/agent.entity.js.map +1 -0
- package/lib/profile/agent/payout.entity.d.ts +70 -0
- package/lib/profile/agent/payout.entity.js +160 -0
- package/lib/profile/agent/payout.entity.js.map +1 -0
- package/lib/profile/agent/promotion.entity.d.ts +82 -0
- package/lib/profile/agent/promotion.entity.js +174 -0
- package/lib/profile/agent/promotion.entity.js.map +1 -0
- package/lib/profile/company/company.entity.d.ts +234 -0
- package/lib/profile/company/company.entity.js +558 -0
- package/lib/profile/company/company.entity.js.map +1 -0
- package/lib/profile/company/course/appointment.entity.d.ts +111 -0
- package/lib/profile/company/course/appointment.entity.js +240 -0
- package/lib/profile/company/course/appointment.entity.js.map +1 -0
- package/lib/profile/company/course/course.entity.d.ts +156 -0
- package/lib/profile/company/course/course.entity.js +365 -0
- package/lib/profile/company/course/course.entity.js.map +1 -0
- package/lib/profile/company/course/lesson.entity.d.ts +123 -0
- package/lib/profile/company/course/lesson.entity.js +288 -0
- package/lib/profile/company/course/lesson.entity.js.map +1 -0
- package/lib/profile/company/course/topic.entity.d.ts +55 -0
- package/lib/profile/company/course/topic.entity.js +147 -0
- package/lib/profile/company/course/topic.entity.js.map +1 -0
- package/lib/profile/company/finances/billing/bill.entity.d.ts +145 -0
- package/lib/profile/company/finances/billing/bill.entity.js +338 -0
- package/lib/profile/company/finances/billing/bill.entity.js.map +1 -0
- package/lib/profile/company/finances/billing/item.entity.d.ts +75 -0
- package/lib/profile/company/finances/billing/item.entity.js +219 -0
- package/lib/profile/company/finances/billing/item.entity.js.map +1 -0
- package/lib/profile/company/finances/billing/transaction.entity.d.ts +44 -0
- package/lib/profile/company/finances/billing/transaction.entity.js +158 -0
- package/lib/profile/company/finances/billing/transaction.entity.js.map +1 -0
- package/lib/profile/company/finances/expense/category.entity.d.ts +55 -0
- package/lib/profile/company/finances/expense/category.entity.js +117 -0
- package/lib/profile/company/finances/expense/category.entity.js.map +1 -0
- package/lib/profile/company/finances/expense/expense.entity.d.ts +48 -0
- package/lib/profile/company/finances/expense/expense.entity.js +171 -0
- package/lib/profile/company/finances/expense/expense.entity.js.map +1 -0
- package/lib/profile/company/finances/handover/handover.entity.d.ts +44 -0
- package/lib/profile/company/finances/handover/handover.entity.js +202 -0
- package/lib/profile/company/finances/handover/handover.entity.js.map +1 -0
- package/lib/profile/company/finances/invoice/invoice.entity.d.ts +65 -0
- package/lib/profile/company/finances/invoice/invoice.entity.js +296 -0
- package/lib/profile/company/finances/invoice/invoice.entity.js.map +1 -0
- package/lib/profile/company/finances/invoice/item.entity.d.ts +25 -0
- package/lib/profile/company/finances/invoice/item.entity.js +148 -0
- package/lib/profile/company/finances/invoice/item.entity.js.map +1 -0
- package/lib/profile/company/finances/payment/method.entity.d.ts +35 -0
- package/lib/profile/company/finances/payment/method.entity.js +143 -0
- package/lib/profile/company/finances/payment/method.entity.js.map +1 -0
- package/lib/profile/company/finances/peyment/method.entity.d.ts +35 -0
- package/lib/profile/company/finances/peyment/method.entity.js +143 -0
- package/lib/profile/company/finances/peyment/method.entity.js.map +1 -0
- package/lib/profile/company/finances/peyment-method/payment-method.d.ts +34 -0
- package/lib/profile/company/finances/peyment-method/payment-method.js +118 -0
- package/lib/profile/company/finances/peyment-method/payment-method.js.map +1 -0
- package/lib/profile/company/instructor/instructor.entity.d.ts +85 -0
- package/lib/profile/company/instructor/instructor.entity.js +254 -0
- package/lib/profile/company/instructor/instructor.entity.js.map +1 -0
- package/lib/profile/company/instructor/task.entity.d.ts +60 -0
- package/lib/profile/company/instructor/task.entity.js +133 -0
- package/lib/profile/company/instructor/task.entity.js.map +1 -0
- package/lib/profile/company/medical/examination.entity.d.ts +59 -0
- package/lib/profile/company/medical/examination.entity.js +175 -0
- package/lib/profile/company/medical/examination.entity.js.map +1 -0
- package/lib/profile/company/medical/product.entity.d.ts +99 -0
- package/lib/profile/company/medical/product.entity.js +270 -0
- package/lib/profile/company/medical/product.entity.js.map +1 -0
- package/lib/profile/company/metrics/company.metric.d.ts +21 -0
- package/lib/profile/company/metrics/company.metric.js +122 -0
- package/lib/profile/company/metrics/company.metric.js.map +1 -0
- package/lib/profile/company/product/addon.entity.d.ts +93 -0
- package/lib/profile/company/product/addon.entity.js +234 -0
- package/lib/profile/company/product/addon.entity.js.map +1 -0
- package/lib/profile/company/product/priceplan.entity.d.ts +57 -0
- package/lib/profile/company/product/priceplan.entity.js +167 -0
- package/lib/profile/company/product/priceplan.entity.js.map +1 -0
- package/lib/profile/company/product/product.entity.d.ts +171 -0
- package/lib/profile/company/product/product.entity.js +383 -0
- package/lib/profile/company/product/product.entity.js.map +1 -0
- package/lib/profile/company/product/vehicle.entity.d.ts +46 -0
- package/lib/profile/company/product/vehicle.entity.js +144 -0
- package/lib/profile/company/product/vehicle.entity.js.map +1 -0
- package/lib/profile/instructor/instructor.entity.d.ts +80 -0
- package/lib/profile/instructor/instructor.entity.js +186 -0
- package/lib/profile/instructor/instructor.entity.js.map +1 -0
- package/lib/profile/student/program/licence/licence.entity.d.ts +66 -0
- package/lib/profile/student/program/licence/licence.entity.js +187 -0
- package/lib/profile/student/program/licence/licence.entity.js.map +1 -0
- package/lib/profile/student/program/medical/certificate.entity.d.ts +84 -0
- package/lib/profile/student/program/medical/certificate.entity.js +244 -0
- package/lib/profile/student/program/medical/certificate.entity.js.map +1 -0
- package/lib/profile/student/program/medical/examination.model.d.ts +65 -0
- package/lib/profile/student/program/medical/examination.model.js +209 -0
- package/lib/profile/student/program/medical/examination.model.js.map +1 -0
- package/lib/profile/student/program/program.entity.d.ts +78 -0
- package/lib/profile/student/program/program.entity.js +225 -0
- package/lib/profile/student/program/program.entity.js.map +1 -0
- package/lib/profile/student/program/training/appointment.entity.d.ts +151 -0
- package/lib/profile/student/program/training/appointment.entity.js +441 -0
- package/lib/profile/student/program/training/appointment.entity.js.map +1 -0
- package/lib/profile/student/program/training/exam.entity.d.ts +41 -0
- package/lib/profile/student/program/training/exam.entity.js +141 -0
- package/lib/profile/student/program/training/exam.entity.js.map +1 -0
- package/lib/profile/student/program/training/lesson.entity.d.ts +84 -0
- package/lib/profile/student/program/training/lesson.entity.js +221 -0
- package/lib/profile/student/program/training/lesson.entity.js.map +1 -0
- package/lib/profile/student/program/training/request.entity.d.ts +56 -0
- package/lib/profile/student/program/training/request.entity.js +159 -0
- package/lib/profile/student/program/training/request.entity.js.map +1 -0
- package/lib/profile/student/program/training/topic.entity.d.ts +109 -0
- package/lib/profile/student/program/training/topic.entity.js +255 -0
- package/lib/profile/student/program/training/topic.entity.js.map +1 -0
- package/lib/profile/student/program/training/training.entity.d.ts +167 -0
- package/lib/profile/student/program/training/training.entity.js +501 -0
- package/lib/profile/student/program/training/training.entity.js.map +1 -0
- package/lib/profile/student/program/training/transaction.entity.d.ts +111 -0
- package/lib/profile/student/program/training/transaction.entity.js +266 -0
- package/lib/profile/student/program/training/transaction.entity.js.map +1 -0
- package/lib/profile/student/student.entity.d.ts +89 -0
- package/lib/profile/student/student.entity.js +183 -0
- package/lib/profile/student/student.entity.js.map +1 -0
- package/lib/system/campaign/campaign.entity.d.ts +68 -0
- package/lib/system/campaign/campaign.entity.js +150 -0
- package/lib/system/campaign/campaign.entity.js.map +1 -0
- package/lib/system/campaign/gifcode.entity.d.ts +14 -0
- package/lib/system/campaign/gifcode.entity.js +77 -0
- package/lib/system/campaign/gifcode.entity.js.map +1 -0
- package/lib/system/campaigne/campaign.entity.d.ts +69 -0
- package/lib/system/campaigne/campaign.entity.js +179 -0
- package/lib/system/campaigne/campaign.entity.js.map +1 -0
- package/lib/system/campaigne/gifcode.entity.d.ts +54 -0
- package/lib/system/campaigne/gifcode.entity.js +126 -0
- package/lib/system/campaigne/gifcode.entity.js.map +1 -0
- package/lib/system/country/country.entity.d.ts +121 -0
- package/lib/system/country/country.entity.js +284 -0
- package/lib/system/country/country.entity.js.map +1 -0
- package/lib/system/country/country.metric.d.ts +12 -0
- package/lib/system/country/country.metric.js +68 -0
- package/lib/system/country/country.metric.js.map +1 -0
- package/lib/system/currency/currency.entity.d.ts +46 -0
- package/lib/system/currency/currency.entity.js +112 -0
- package/lib/system/currency/currency.entity.js.map +1 -0
- package/lib/system/driving/category.entity.d.ts +146 -0
- package/lib/system/driving/category.entity.js +321 -0
- package/lib/system/driving/category.entity.js.map +1 -0
- package/lib/system/driving/vehicle.entity.d.ts +54 -0
- package/lib/system/driving/vehicle.entity.js +130 -0
- package/lib/system/driving/vehicle.entity.js.map +1 -0
- package/lib/system/event/business.entity.d.ts +75 -0
- package/lib/system/event/business.entity.js +170 -0
- package/lib/system/event/business.entity.js.map +1 -0
- package/lib/system/event/log.entity.d.ts +103 -0
- package/lib/system/event/log.entity.js +202 -0
- package/lib/system/event/log.entity.js.map +1 -0
- package/lib/system/policy/policy.entity.d.ts +90 -0
- package/lib/system/policy/policy.entity.js +226 -0
- package/lib/system/policy/policy.entity.js.map +1 -0
- package/lib/system/staff/staff.entity.d.ts +72 -0
- package/lib/system/staff/staff.entity.js +186 -0
- package/lib/system/staff/staff.entity.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/user/alert.entity.d.ts +95 -0
- package/lib/user/alert.entity.js +223 -0
- package/lib/user/alert.entity.js.map +1 -0
- package/lib/user/blocked.entity.d.ts +42 -0
- package/lib/user/blocked.entity.js +83 -0
- package/lib/user/blocked.entity.js.map +1 -0
- package/lib/user/device.entity.d.ts +72 -0
- package/lib/user/device.entity.js +182 -0
- package/lib/user/device.entity.js.map +1 -0
- package/lib/user/notification.entity.d.ts +87 -0
- package/lib/user/notification.entity.js +219 -0
- package/lib/user/notification.entity.js.map +1 -0
- package/lib/user/ticket.entity.d.ts +85 -0
- package/lib/user/ticket.entity.js +231 -0
- package/lib/user/ticket.entity.js.map +1 -0
- package/lib/user/user.entity.d.ts +235 -0
- package/lib/user/user.entity.js +573 -0
- package/lib/user/user.entity.js.map +1 -0
- package/lib/user/verification.entity.d.ts +75 -0
- package/lib/user/verification.entity.js +142 -0
- package/lib/user/verification.entity.js.map +1 -0
- package/lib/utils/activity.helper.d.ts +26 -0
- package/lib/utils/activity.helper.js +39 -0
- package/lib/utils/activity.helper.js.map +1 -0
- package/lib/utils/index.d.ts +4 -0
- package/lib/utils/index.js +21 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/json-metrics.transform.d.ts +35 -0
- package/lib/utils/json-metrics.transform.js +83 -0
- package/lib/utils/json-metrics.transform.js.map +1 -0
- package/lib/utils/numeric.transform.d.ts +38 -0
- package/lib/utils/numeric.transform.js +74 -0
- package/lib/utils/numeric.transform.js.map +1 -0
- package/lib/utils/trackable.entity.d.ts +82 -0
- package/lib/utils/trackable.entity.js +100 -0
- package/lib/utils/trackable.entity.js.map +1 -0
- 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 @@
|
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C,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,CAA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
|
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
|
+
}
|