@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,118 @@
|
|
|
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.CompanyPaymentMethodEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const typeorm_2 = require("typeorm");
|
|
15
|
+
const company_entity_1 = require("../../company.entity");
|
|
16
|
+
const transaction_entity_1 = require("../billing/transaction.entity");
|
|
17
|
+
const common_1 = require("@driveup/common");
|
|
18
|
+
const priceplan_entity_1 = require("../../product/priceplan.entity");
|
|
19
|
+
const utils_1 = require("../../../../utils");
|
|
20
|
+
let CompanyPaymentMethodEntity = class CompanyPaymentMethodEntity extends utils_1.TrackableEntity {
|
|
21
|
+
constructor(props) {
|
|
22
|
+
super();
|
|
23
|
+
Object.assign(this, props);
|
|
24
|
+
}
|
|
25
|
+
toModel() {
|
|
26
|
+
return new common_1.PaymentMethod({
|
|
27
|
+
id: this.id,
|
|
28
|
+
name: this.name,
|
|
29
|
+
active: this.active,
|
|
30
|
+
methodId: this.methodId,
|
|
31
|
+
customerId: this.customerId,
|
|
32
|
+
confirmed: this.confirmed,
|
|
33
|
+
metadata: this.metadata,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
async getFailedTransactions() {
|
|
37
|
+
return await transaction_entity_1.CompanyBillTransactionEntity
|
|
38
|
+
.createQueryBuilder('t')
|
|
39
|
+
.leftJoinAndSelect('t.bill', 'bill')
|
|
40
|
+
.where('t.paymentMethodId = :id', { id: this.id })
|
|
41
|
+
.andWhere('t.status = :status', { status: common_1.StatusType.Failed })
|
|
42
|
+
.andWhere('bill.status = :billStatus', { billStatus: common_1.BillStatus.Unpaid })
|
|
43
|
+
.getMany();
|
|
44
|
+
}
|
|
45
|
+
async getActivities() {
|
|
46
|
+
const activities = [];
|
|
47
|
+
activities.push(await (0, utils_1.toActivity)(this.createdBy, common_1.ActivityType.createdBy));
|
|
48
|
+
activities.push(await (0, utils_1.toActivity)(this.createdOn, common_1.ActivityType.createdOn));
|
|
49
|
+
activities.push(await (0, utils_1.toActivity)(this.updatedBy, common_1.ActivityType.updatedBy));
|
|
50
|
+
activities.push(await (0, utils_1.toActivity)(this.updatedOn, common_1.ActivityType.updatedOn));
|
|
51
|
+
return activities.filter(a => !a);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
exports.CompanyPaymentMethodEntity = CompanyPaymentMethodEntity;
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)(),
|
|
57
|
+
__metadata("design:type", Number)
|
|
58
|
+
], CompanyPaymentMethodEntity.prototype, "companyId", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({
|
|
61
|
+
nullable: true,
|
|
62
|
+
default: null
|
|
63
|
+
}),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], CompanyPaymentMethodEntity.prototype, "name", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({
|
|
68
|
+
nullable: false,
|
|
69
|
+
default: true
|
|
70
|
+
}),
|
|
71
|
+
__metadata("design:type", Boolean)
|
|
72
|
+
], CompanyPaymentMethodEntity.prototype, "active", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.Column)({
|
|
75
|
+
type: 'simple-json',
|
|
76
|
+
nullable: true,
|
|
77
|
+
default: null
|
|
78
|
+
}),
|
|
79
|
+
__metadata("design:type", Object)
|
|
80
|
+
], CompanyPaymentMethodEntity.prototype, "metadata", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typeorm_1.Column)({
|
|
83
|
+
nullable: true,
|
|
84
|
+
default: null
|
|
85
|
+
}),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], CompanyPaymentMethodEntity.prototype, "methodId", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.Column)({
|
|
90
|
+
nullable: true,
|
|
91
|
+
default: null
|
|
92
|
+
}),
|
|
93
|
+
__metadata("design:type", String)
|
|
94
|
+
], CompanyPaymentMethodEntity.prototype, "customerId", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, typeorm_1.Column)({
|
|
97
|
+
nullable: false,
|
|
98
|
+
default: false
|
|
99
|
+
}),
|
|
100
|
+
__metadata("design:type", Boolean)
|
|
101
|
+
], CompanyPaymentMethodEntity.prototype, "confirmed", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, typeorm_2.ManyToOne)(() => company_entity_1.CompanyEntity, company => company.paymentMethods),
|
|
104
|
+
__metadata("design:type", Promise)
|
|
105
|
+
], CompanyPaymentMethodEntity.prototype, "company", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, typeorm_2.OneToMany)(() => transaction_entity_1.CompanyBillTransactionEntity, payment => payment.paymentMethod),
|
|
108
|
+
__metadata("design:type", Promise)
|
|
109
|
+
], CompanyPaymentMethodEntity.prototype, "transactions", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, typeorm_1.OneToOne)(() => priceplan_entity_1.CompanyProductPricePlanEntity, priceplan => priceplan.paymentMethod),
|
|
112
|
+
__metadata("design:type", Promise)
|
|
113
|
+
], CompanyPaymentMethodEntity.prototype, "productPaymentMethod", void 0);
|
|
114
|
+
exports.CompanyPaymentMethodEntity = CompanyPaymentMethodEntity = __decorate([
|
|
115
|
+
(0, typeorm_1.Entity)('companyPaymentMethods'),
|
|
116
|
+
__metadata("design:paramtypes", [Object])
|
|
117
|
+
], CompanyPaymentMethodEntity);
|
|
118
|
+
//# sourceMappingURL=payment-method.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-method.js","sourceRoot":"","sources":["../../../../../src/profile/company/finances/peyment-method/payment-method.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,q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GAAG,EAAE,CAAC,iDAA4B,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC;;gEAC1B;AAMtD;IADC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,gDAA6B,EAAE,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC;;wEACvB;qCA9DjD,0BAA0B;IADtC,IAAA,gBAAM,EAAC,uBAAuB,CAAC;;GACnB,0BAA0B,CAmGtC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { AccountStatus, Activity, Instructor } from '@driveup/common';
|
|
2
|
+
import { WorkingHours, Holiday, Preference, CompanyRole } from '@driveup/common';
|
|
3
|
+
import { CompanyEntity } from '../company.entity';
|
|
4
|
+
import { CompanyInstructorTaskEntity } from './task.entity';
|
|
5
|
+
import { InstructorEntity } from '../../instructor/instructor.entity';
|
|
6
|
+
import { CompanyHandoverEntity } from '../finances/handover/handover.entity';
|
|
7
|
+
import { CompanyCourseEntity } from '../course/course.entity';
|
|
8
|
+
import { CompanyCourseLessonEntity } from '../course/lesson.entity';
|
|
9
|
+
import { StudentTrainingEntity } from '../../student/program/training/training.entity';
|
|
10
|
+
import { StudentTrainingAppointmentEntity } from '../../student/program/training/appointment.entity';
|
|
11
|
+
import { CompanyCourseAppointmentEntity } from '../course/appointment.entity';
|
|
12
|
+
import { StudentTrainingLessonEntity } from '../../student/program/training/lesson.entity';
|
|
13
|
+
import { TrackableEntity } from '../../../utils';
|
|
14
|
+
export declare class CompanyInstructorEntity extends TrackableEntity<Instructor> {
|
|
15
|
+
instructorId: number;
|
|
16
|
+
companyId: number;
|
|
17
|
+
status: AccountStatus;
|
|
18
|
+
role: CompanyRole;
|
|
19
|
+
/**
|
|
20
|
+
* Instructor working hours definition
|
|
21
|
+
* @attention must get a default value of empty object array when creating the entity
|
|
22
|
+
*/
|
|
23
|
+
workingHours: WorkingHours[];
|
|
24
|
+
/**
|
|
25
|
+
* Instructor holidays / off-days
|
|
26
|
+
* @attention must get a default value of empty object array when creating the entity
|
|
27
|
+
*/
|
|
28
|
+
holidays: Holiday[];
|
|
29
|
+
/**
|
|
30
|
+
* Notification preferences stored as JSON
|
|
31
|
+
*/
|
|
32
|
+
preferences: Preference[];
|
|
33
|
+
startedOn: Date;
|
|
34
|
+
invitedBy: number;
|
|
35
|
+
invitedOn: Date;
|
|
36
|
+
closedBy: number;
|
|
37
|
+
closedOn: Date;
|
|
38
|
+
/**
|
|
39
|
+
* Instrucor profile relation
|
|
40
|
+
*/
|
|
41
|
+
instructor: Promise<InstructorEntity>;
|
|
42
|
+
/**
|
|
43
|
+
* Company relation
|
|
44
|
+
*/
|
|
45
|
+
company: Promise<CompanyEntity>;
|
|
46
|
+
/**
|
|
47
|
+
* Company course assigned to this instructor (in-charge)
|
|
48
|
+
*/
|
|
49
|
+
companyCourses: Promise<CompanyCourseEntity[]>;
|
|
50
|
+
/**
|
|
51
|
+
* Company course lesson assigned to this instructor (in-charge)
|
|
52
|
+
*/
|
|
53
|
+
companyCourseLessons: Promise<CompanyCourseLessonEntity[]>;
|
|
54
|
+
/**
|
|
55
|
+
* Company course appointments assigned to this instructor (in-charge)
|
|
56
|
+
*/
|
|
57
|
+
companyCourseAppointments: Promise<CompanyCourseAppointmentEntity[]>;
|
|
58
|
+
/**
|
|
59
|
+
* Tasks assigned to the instructors
|
|
60
|
+
*/
|
|
61
|
+
companyHandovers: Promise<CompanyHandoverEntity[]>;
|
|
62
|
+
/**
|
|
63
|
+
* Student training assigned to this instructor (in-charge)
|
|
64
|
+
*/
|
|
65
|
+
studentTrainings: Promise<StudentTrainingEntity[]>;
|
|
66
|
+
/**
|
|
67
|
+
* Student training lessons assigned to this instructor
|
|
68
|
+
*/
|
|
69
|
+
studentTrainingLessons: Promise<StudentTrainingLessonEntity[]>;
|
|
70
|
+
/**s
|
|
71
|
+
* Instructor student training appointments
|
|
72
|
+
*/
|
|
73
|
+
studentTrainingAppointments: Promise<StudentTrainingAppointmentEntity[]>;
|
|
74
|
+
/**
|
|
75
|
+
* Tasks assigned to the instructors
|
|
76
|
+
*/
|
|
77
|
+
tasks: Promise<CompanyInstructorTaskEntity[]>;
|
|
78
|
+
constructor(props?: Partial<CompanyInstructorEntity>);
|
|
79
|
+
toModel(): Promise<Instructor>;
|
|
80
|
+
toSummary(): Promise<Instructor>;
|
|
81
|
+
toPerson(): Promise<import("@driveup/common").Person>;
|
|
82
|
+
getInstructor(): Promise<InstructorEntity>;
|
|
83
|
+
canReinstate(): Promise<boolean>;
|
|
84
|
+
getActivities(): Promise<Activity[]>;
|
|
85
|
+
}
|
|
@@ -0,0 +1,254 @@
|
|
|
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.CompanyInstructorEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const common_1 = require("@driveup/common");
|
|
15
|
+
const common_2 = require("@driveup/common");
|
|
16
|
+
const company_entity_1 = require("../company.entity");
|
|
17
|
+
const task_entity_1 = require("./task.entity");
|
|
18
|
+
const instructor_entity_1 = require("../../instructor/instructor.entity");
|
|
19
|
+
const handover_entity_1 = require("../finances/handover/handover.entity");
|
|
20
|
+
const course_entity_1 = require("../course/course.entity");
|
|
21
|
+
const lesson_entity_1 = require("../course/lesson.entity");
|
|
22
|
+
const training_entity_1 = require("../../student/program/training/training.entity");
|
|
23
|
+
const appointment_entity_1 = require("../../student/program/training/appointment.entity");
|
|
24
|
+
const appointment_entity_2 = require("../course/appointment.entity");
|
|
25
|
+
const lesson_entity_2 = require("../../student/program/training/lesson.entity");
|
|
26
|
+
const utils_1 = require("../../../utils");
|
|
27
|
+
let CompanyInstructorEntity = class CompanyInstructorEntity extends utils_1.TrackableEntity {
|
|
28
|
+
instructorId;
|
|
29
|
+
companyId;
|
|
30
|
+
status;
|
|
31
|
+
role;
|
|
32
|
+
/**
|
|
33
|
+
* Instructor working hours definition
|
|
34
|
+
* @attention must get a default value of empty object array when creating the entity
|
|
35
|
+
*/
|
|
36
|
+
workingHours;
|
|
37
|
+
/**
|
|
38
|
+
* Instructor holidays / off-days
|
|
39
|
+
* @attention must get a default value of empty object array when creating the entity
|
|
40
|
+
*/
|
|
41
|
+
holidays;
|
|
42
|
+
/**
|
|
43
|
+
* Notification preferences stored as JSON
|
|
44
|
+
*/
|
|
45
|
+
preferences;
|
|
46
|
+
startedOn;
|
|
47
|
+
invitedBy;
|
|
48
|
+
invitedOn;
|
|
49
|
+
closedBy;
|
|
50
|
+
closedOn;
|
|
51
|
+
/**
|
|
52
|
+
* Instrucor profile relation
|
|
53
|
+
*/
|
|
54
|
+
instructor;
|
|
55
|
+
/**
|
|
56
|
+
* Company relation
|
|
57
|
+
*/
|
|
58
|
+
company;
|
|
59
|
+
/**
|
|
60
|
+
* Company course assigned to this instructor (in-charge)
|
|
61
|
+
*/
|
|
62
|
+
companyCourses;
|
|
63
|
+
/**
|
|
64
|
+
* Company course lesson assigned to this instructor (in-charge)
|
|
65
|
+
*/
|
|
66
|
+
companyCourseLessons;
|
|
67
|
+
/**
|
|
68
|
+
* Company course appointments assigned to this instructor (in-charge)
|
|
69
|
+
*/
|
|
70
|
+
companyCourseAppointments;
|
|
71
|
+
/**
|
|
72
|
+
* Tasks assigned to the instructors
|
|
73
|
+
*/
|
|
74
|
+
companyHandovers;
|
|
75
|
+
/**
|
|
76
|
+
* Student training assigned to this instructor (in-charge)
|
|
77
|
+
*/
|
|
78
|
+
studentTrainings;
|
|
79
|
+
/**
|
|
80
|
+
* Student training lessons assigned to this instructor
|
|
81
|
+
*/
|
|
82
|
+
studentTrainingLessons;
|
|
83
|
+
/**s
|
|
84
|
+
* Instructor student training appointments
|
|
85
|
+
*/
|
|
86
|
+
studentTrainingAppointments;
|
|
87
|
+
/**
|
|
88
|
+
* Tasks assigned to the instructors
|
|
89
|
+
*/
|
|
90
|
+
tasks;
|
|
91
|
+
constructor(props) {
|
|
92
|
+
super();
|
|
93
|
+
Object.assign(this, props);
|
|
94
|
+
}
|
|
95
|
+
async toModel() {
|
|
96
|
+
const entity = await this.instructor;
|
|
97
|
+
const instructor = await entity.toModel();
|
|
98
|
+
instructor.id = this.id;
|
|
99
|
+
instructor.status = this.status;
|
|
100
|
+
instructor.role = this.role;
|
|
101
|
+
instructor.startedOn = this.startedOn;
|
|
102
|
+
instructor.workingHours = this.workingHours?.map(common_2.WorkingHours.toInstance);
|
|
103
|
+
instructor.holidays = this.holidays?.map(common_2.Holiday.toInstance);
|
|
104
|
+
instructor.preferences = this.preferences?.map(common_2.Preference.toInstance);
|
|
105
|
+
return instructor;
|
|
106
|
+
}
|
|
107
|
+
async toSummary() {
|
|
108
|
+
const entity = await this.instructor;
|
|
109
|
+
const instructor = await entity.toModel();
|
|
110
|
+
instructor.id = this.id;
|
|
111
|
+
instructor.status = this.status;
|
|
112
|
+
instructor.role = this.role;
|
|
113
|
+
return instructor;
|
|
114
|
+
}
|
|
115
|
+
async toPerson() {
|
|
116
|
+
const instructor = await this.instructor;
|
|
117
|
+
return await instructor.toPerson();
|
|
118
|
+
}
|
|
119
|
+
async getInstructor() {
|
|
120
|
+
return await this.instructor;
|
|
121
|
+
}
|
|
122
|
+
async canReinstate() {
|
|
123
|
+
const instructor = await this.getInstructor();
|
|
124
|
+
return this.status === common_1.AccountStatus.Closed && instructor.status === common_1.AccountStatus.Active;
|
|
125
|
+
}
|
|
126
|
+
async getActivities() {
|
|
127
|
+
const activities = [];
|
|
128
|
+
activities.push(await (0, utils_1.toActivity)(this.createdBy, common_1.ActivityType.createdBy));
|
|
129
|
+
activities.push(await (0, utils_1.toActivity)(this.createdOn, common_1.ActivityType.createdOn));
|
|
130
|
+
activities.push(await (0, utils_1.toActivity)(this.updatedBy, common_1.ActivityType.updatedBy));
|
|
131
|
+
activities.push(await (0, utils_1.toActivity)(this.updatedOn, common_1.ActivityType.updatedOn));
|
|
132
|
+
activities.push(await (0, utils_1.toActivity)(this.closedBy, common_1.ActivityType.closedBy));
|
|
133
|
+
activities.push(await (0, utils_1.toActivity)(this.closedOn, common_1.ActivityType.closedOn));
|
|
134
|
+
activities.push(await (0, utils_1.toActivity)(this.invitedBy, common_1.ActivityType.invitedBy));
|
|
135
|
+
activities.push(await (0, utils_1.toActivity)(this.invitedOn, common_1.ActivityType.invitedOn));
|
|
136
|
+
return activities.filter(a => a);
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
exports.CompanyInstructorEntity = CompanyInstructorEntity;
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, typeorm_1.Column)(),
|
|
142
|
+
__metadata("design:type", Number)
|
|
143
|
+
], CompanyInstructorEntity.prototype, "instructorId", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, typeorm_1.Column)(),
|
|
146
|
+
__metadata("design:type", Number)
|
|
147
|
+
], CompanyInstructorEntity.prototype, "companyId", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
(0, typeorm_1.Column)({
|
|
150
|
+
type: 'enum',
|
|
151
|
+
enum: common_1.AccountStatus,
|
|
152
|
+
default: common_1.AccountStatus.Invited,
|
|
153
|
+
nullable: false
|
|
154
|
+
}),
|
|
155
|
+
__metadata("design:type", String)
|
|
156
|
+
], CompanyInstructorEntity.prototype, "status", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, typeorm_1.Column)({
|
|
159
|
+
type: 'enum',
|
|
160
|
+
enum: common_2.CompanyRole,
|
|
161
|
+
default: common_2.CompanyRole.Instructor,
|
|
162
|
+
nullable: false
|
|
163
|
+
}),
|
|
164
|
+
__metadata("design:type", String)
|
|
165
|
+
], CompanyInstructorEntity.prototype, "role", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
(0, typeorm_1.Column)({
|
|
168
|
+
type: 'simple-json',
|
|
169
|
+
nullable: true,
|
|
170
|
+
default: null
|
|
171
|
+
}),
|
|
172
|
+
__metadata("design:type", Array)
|
|
173
|
+
], CompanyInstructorEntity.prototype, "workingHours", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
(0, typeorm_1.Column)({
|
|
176
|
+
type: 'simple-json',
|
|
177
|
+
nullable: true,
|
|
178
|
+
default: null
|
|
179
|
+
}),
|
|
180
|
+
__metadata("design:type", Array)
|
|
181
|
+
], CompanyInstructorEntity.prototype, "holidays", void 0);
|
|
182
|
+
__decorate([
|
|
183
|
+
(0, typeorm_1.Column)({
|
|
184
|
+
type: 'simple-json',
|
|
185
|
+
nullable: true,
|
|
186
|
+
default: null
|
|
187
|
+
}),
|
|
188
|
+
__metadata("design:type", Array)
|
|
189
|
+
], CompanyInstructorEntity.prototype, "preferences", void 0);
|
|
190
|
+
__decorate([
|
|
191
|
+
(0, typeorm_1.Column)({ nullable: true, default: null }),
|
|
192
|
+
__metadata("design:type", Date)
|
|
193
|
+
], CompanyInstructorEntity.prototype, "startedOn", void 0);
|
|
194
|
+
__decorate([
|
|
195
|
+
(0, typeorm_1.Column)({ nullable: true, default: null }),
|
|
196
|
+
__metadata("design:type", Number)
|
|
197
|
+
], CompanyInstructorEntity.prototype, "invitedBy", void 0);
|
|
198
|
+
__decorate([
|
|
199
|
+
(0, typeorm_1.Column)({ nullable: true, default: null }),
|
|
200
|
+
__metadata("design:type", Date)
|
|
201
|
+
], CompanyInstructorEntity.prototype, "invitedOn", void 0);
|
|
202
|
+
__decorate([
|
|
203
|
+
(0, typeorm_1.Column)({ nullable: true, default: null }),
|
|
204
|
+
__metadata("design:type", Number)
|
|
205
|
+
], CompanyInstructorEntity.prototype, "closedBy", void 0);
|
|
206
|
+
__decorate([
|
|
207
|
+
(0, typeorm_1.Column)({ nullable: true, default: null }),
|
|
208
|
+
__metadata("design:type", Date)
|
|
209
|
+
], CompanyInstructorEntity.prototype, "closedOn", void 0);
|
|
210
|
+
__decorate([
|
|
211
|
+
(0, typeorm_1.ManyToOne)(() => instructor_entity_1.InstructorEntity, instructor => instructor.companies),
|
|
212
|
+
__metadata("design:type", Promise)
|
|
213
|
+
], CompanyInstructorEntity.prototype, "instructor", void 0);
|
|
214
|
+
__decorate([
|
|
215
|
+
(0, typeorm_1.ManyToOne)(() => company_entity_1.CompanyEntity, company => company.instructors),
|
|
216
|
+
__metadata("design:type", Promise)
|
|
217
|
+
], CompanyInstructorEntity.prototype, "company", void 0);
|
|
218
|
+
__decorate([
|
|
219
|
+
(0, typeorm_1.OneToMany)(() => course_entity_1.CompanyCourseEntity, training => training.instructor),
|
|
220
|
+
__metadata("design:type", Promise)
|
|
221
|
+
], CompanyInstructorEntity.prototype, "companyCourses", void 0);
|
|
222
|
+
__decorate([
|
|
223
|
+
(0, typeorm_1.OneToMany)(() => lesson_entity_1.CompanyCourseLessonEntity, lesson => lesson.instructor),
|
|
224
|
+
__metadata("design:type", Promise)
|
|
225
|
+
], CompanyInstructorEntity.prototype, "companyCourseLessons", void 0);
|
|
226
|
+
__decorate([
|
|
227
|
+
(0, typeorm_1.OneToMany)(() => appointment_entity_2.CompanyCourseAppointmentEntity, appointment => appointment.instructor),
|
|
228
|
+
__metadata("design:type", Promise)
|
|
229
|
+
], CompanyInstructorEntity.prototype, "companyCourseAppointments", void 0);
|
|
230
|
+
__decorate([
|
|
231
|
+
(0, typeorm_1.OneToMany)(() => handover_entity_1.CompanyHandoverEntity, handover => handover.instructor),
|
|
232
|
+
__metadata("design:type", Promise)
|
|
233
|
+
], CompanyInstructorEntity.prototype, "companyHandovers", void 0);
|
|
234
|
+
__decorate([
|
|
235
|
+
(0, typeorm_1.OneToMany)(() => training_entity_1.StudentTrainingEntity, training => training.instructor),
|
|
236
|
+
__metadata("design:type", Promise)
|
|
237
|
+
], CompanyInstructorEntity.prototype, "studentTrainings", void 0);
|
|
238
|
+
__decorate([
|
|
239
|
+
(0, typeorm_1.OneToMany)(() => lesson_entity_2.StudentTrainingLessonEntity, lesson => lesson.instructor),
|
|
240
|
+
__metadata("design:type", Promise)
|
|
241
|
+
], CompanyInstructorEntity.prototype, "studentTrainingLessons", void 0);
|
|
242
|
+
__decorate([
|
|
243
|
+
(0, typeorm_1.OneToMany)(() => appointment_entity_1.StudentTrainingAppointmentEntity, appointment => appointment.instructor),
|
|
244
|
+
__metadata("design:type", Promise)
|
|
245
|
+
], CompanyInstructorEntity.prototype, "studentTrainingAppointments", void 0);
|
|
246
|
+
__decorate([
|
|
247
|
+
(0, typeorm_1.OneToMany)(() => task_entity_1.CompanyInstructorTaskEntity, task => task.instructor),
|
|
248
|
+
__metadata("design:type", Promise)
|
|
249
|
+
], CompanyInstructorEntity.prototype, "tasks", void 0);
|
|
250
|
+
exports.CompanyInstructorEntity = CompanyInstructorEntity = __decorate([
|
|
251
|
+
(0, typeorm_1.Entity)('companyInstructors'),
|
|
252
|
+
__metadata("design:paramtypes", [Object])
|
|
253
|
+
], CompanyInstructorEntity);
|
|
254
|
+
//# sourceMappingURL=instructor.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructor.entity.js","sourceRoot":"","sources":["../../../../src/profile/company/instructor/instructor.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA+D;AAC/D,4CAAoF;AACpF,4CAAiF;AACjF,sDAAkD;AAClD,+CAA4D;AAC5D,0EAAsE;AACtE,0EAA6E;AAC7E,2DAA8D;AAC9D,2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
|
|
3
|
+
import { TrackableEntity } from '../../../utils';
|
|
4
|
+
/**
|
|
5
|
+
* Represents a task or calendar event for a company instructor.
|
|
6
|
+
* Tasks can represent scheduled work, appointments, meetings, or other time blocks.
|
|
7
|
+
* Tracks availability and completion status for scheduling purposes.
|
|
8
|
+
*
|
|
9
|
+
* @extends TrackableEntity<Task>
|
|
10
|
+
*/
|
|
11
|
+
export declare class CompanyInstructorTaskEntity extends TrackableEntity<Task> {
|
|
12
|
+
/**
|
|
13
|
+
* Reference to the instructor who owns this task
|
|
14
|
+
*/
|
|
15
|
+
instructorId: number;
|
|
16
|
+
/**
|
|
17
|
+
* Task title or description
|
|
18
|
+
*/
|
|
19
|
+
title: string;
|
|
20
|
+
/**
|
|
21
|
+
* Task start date and time
|
|
22
|
+
*/
|
|
23
|
+
startDate: Date;
|
|
24
|
+
/**
|
|
25
|
+
* Task end date and time
|
|
26
|
+
*/
|
|
27
|
+
endDate: Date;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the task spans the entire day
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
allDay: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Whether the instructor is busy during this time
|
|
35
|
+
* Used for scheduling conflicts
|
|
36
|
+
* @default true
|
|
37
|
+
*/
|
|
38
|
+
busy: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Whether the task has been completed
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
done: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Reference to the instructor who owns this task
|
|
46
|
+
*/
|
|
47
|
+
instructor: Promise<CompanyInstructorEntity>;
|
|
48
|
+
/**
|
|
49
|
+
* Creates an instance of CompanyInstructorTaskEntity
|
|
50
|
+
* @param props - Partial properties to initialize the entity
|
|
51
|
+
*/
|
|
52
|
+
constructor(props?: Partial<CompanyInstructorTaskEntity>);
|
|
53
|
+
/**
|
|
54
|
+
* Converts the entity to a Task model instance
|
|
55
|
+
* @returns Task model with all task information
|
|
56
|
+
*/
|
|
57
|
+
toModel(): Task;
|
|
58
|
+
toSummary(): Task;
|
|
59
|
+
getActivities(): Promise<Activity[]>;
|
|
60
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
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.CompanyInstructorTaskEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const common_1 = require("@driveup/common");
|
|
15
|
+
const instructor_entity_1 = require("./instructor.entity");
|
|
16
|
+
const utils_1 = require("../../../utils");
|
|
17
|
+
/**
|
|
18
|
+
* Represents a task or calendar event for a company instructor.
|
|
19
|
+
* Tasks can represent scheduled work, appointments, meetings, or other time blocks.
|
|
20
|
+
* Tracks availability and completion status for scheduling purposes.
|
|
21
|
+
*
|
|
22
|
+
* @extends TrackableEntity<Task>
|
|
23
|
+
*/
|
|
24
|
+
let CompanyInstructorTaskEntity = class CompanyInstructorTaskEntity extends utils_1.TrackableEntity {
|
|
25
|
+
/**
|
|
26
|
+
* Reference to the instructor who owns this task
|
|
27
|
+
*/
|
|
28
|
+
instructorId;
|
|
29
|
+
/**
|
|
30
|
+
* Task title or description
|
|
31
|
+
*/
|
|
32
|
+
title;
|
|
33
|
+
/**
|
|
34
|
+
* Task start date and time
|
|
35
|
+
*/
|
|
36
|
+
startDate;
|
|
37
|
+
/**
|
|
38
|
+
* Task end date and time
|
|
39
|
+
*/
|
|
40
|
+
endDate;
|
|
41
|
+
/**
|
|
42
|
+
* Whether the task spans the entire day
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
allDay;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the instructor is busy during this time
|
|
48
|
+
* Used for scheduling conflicts
|
|
49
|
+
* @default true
|
|
50
|
+
*/
|
|
51
|
+
busy;
|
|
52
|
+
/**
|
|
53
|
+
* Whether the task has been completed
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
done;
|
|
57
|
+
/**
|
|
58
|
+
* Reference to the instructor who owns this task
|
|
59
|
+
*/
|
|
60
|
+
instructor;
|
|
61
|
+
/**
|
|
62
|
+
* Creates an instance of CompanyInstructorTaskEntity
|
|
63
|
+
* @param props - Partial properties to initialize the entity
|
|
64
|
+
*/
|
|
65
|
+
constructor(props) {
|
|
66
|
+
super();
|
|
67
|
+
Object.assign(this, props);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Converts the entity to a Task model instance
|
|
71
|
+
* @returns Task model with all task information
|
|
72
|
+
*/
|
|
73
|
+
toModel() {
|
|
74
|
+
return new common_1.Task({
|
|
75
|
+
id: this.id,
|
|
76
|
+
title: this.title,
|
|
77
|
+
startDate: this.startDate,
|
|
78
|
+
endDate: this.endDate,
|
|
79
|
+
allDay: this.allDay,
|
|
80
|
+
busy: this.busy,
|
|
81
|
+
done: this.done
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
toSummary() {
|
|
85
|
+
return this.toModel();
|
|
86
|
+
}
|
|
87
|
+
async getActivities() {
|
|
88
|
+
const activities = [];
|
|
89
|
+
activities.push(await (0, utils_1.toActivity)(this.createdBy, common_1.ActivityType.createdBy));
|
|
90
|
+
activities.push(await (0, utils_1.toActivity)(this.createdOn, common_1.ActivityType.createdOn));
|
|
91
|
+
activities.push(await (0, utils_1.toActivity)(this.updatedBy, common_1.ActivityType.updatedBy));
|
|
92
|
+
activities.push(await (0, utils_1.toActivity)(this.updatedOn, common_1.ActivityType.updatedOn));
|
|
93
|
+
return activities.filter(a => a);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
exports.CompanyInstructorTaskEntity = CompanyInstructorTaskEntity;
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, typeorm_1.Column)(),
|
|
99
|
+
__metadata("design:type", Number)
|
|
100
|
+
], CompanyInstructorTaskEntity.prototype, "instructorId", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, typeorm_1.Column)(),
|
|
103
|
+
__metadata("design:type", String)
|
|
104
|
+
], CompanyInstructorTaskEntity.prototype, "title", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, typeorm_1.Column)(),
|
|
107
|
+
__metadata("design:type", Date)
|
|
108
|
+
], CompanyInstructorTaskEntity.prototype, "startDate", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, typeorm_1.Column)(),
|
|
111
|
+
__metadata("design:type", Date)
|
|
112
|
+
], CompanyInstructorTaskEntity.prototype, "endDate", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
115
|
+
__metadata("design:type", Boolean)
|
|
116
|
+
], CompanyInstructorTaskEntity.prototype, "allDay", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, typeorm_1.Column)({ default: true }),
|
|
119
|
+
__metadata("design:type", Boolean)
|
|
120
|
+
], CompanyInstructorTaskEntity.prototype, "busy", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
123
|
+
__metadata("design:type", Boolean)
|
|
124
|
+
], CompanyInstructorTaskEntity.prototype, "done", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, typeorm_1.ManyToOne)(() => instructor_entity_1.CompanyInstructorEntity, instructor => instructor.tasks),
|
|
127
|
+
__metadata("design:type", Promise)
|
|
128
|
+
], CompanyInstructorTaskEntity.prototype, "instructor", void 0);
|
|
129
|
+
exports.CompanyInstructorTaskEntity = CompanyInstructorTaskEntity = __decorate([
|
|
130
|
+
(0, typeorm_1.Entity)('companyInstructorTasks'),
|
|
131
|
+
__metadata("design:paramtypes", [Object])
|
|
132
|
+
], CompanyInstructorTaskEntity);
|
|
133
|
+
//# sourceMappingURL=task.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task.entity.js","sourceRoot":"","sources":["../../../../src/profile/company/instructor/task.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAoD;AACpD,4CAA+D;AAC/D,2DAA8D;AAC9D,0CAA6D;AAE7D;;;;;;GAMG;AAEI,IAAM,2BAA2B,GAAjC,MAAM,2BAA4B,SAAQ,uBAAqB;IAErE;;OAEG;IAEH,YAAY,CAAS;IAErB;;OAEG;IAEH,KAAK,CAAS;IAEd;;OAEG;IAEH,SAAS,CAAO;IAEhB;;OAEG;IAEH,OAAO,CAAO;IAEd;;;OAGG;IAEH,MAAM,CAAU;IAEhB;;;;OAIG;IAEH,IAAI,CAAU;IAEd;;;OAGG;IAEH,IAAI,CAAU;IAEd;;OAEG;IAEH,UAAU,CAAmC;IAE7C;;;OAGG;IACH,YAAY,KAA4C;QACvD,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACH,OAAO;QACN,OAAO,IAAI,aAAI,CAAC;YACf,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,MAAM,EAAE,IAAI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