@driveup/schema 0.2.2 → 0.2.4
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/lib/catalog/addon/addon.entity.d.ts +2 -2
- package/lib/catalog/addon/addon.entity.js +17 -21
- package/lib/catalog/addon/addon.entity.js.map +1 -1
- package/lib/catalog/addon/country.entity.d.ts +4 -3
- package/lib/catalog/addon/country.entity.js +7 -10
- package/lib/catalog/addon/country.entity.js.map +1 -1
- package/lib/catalog/priceplan/priceplan.entity.d.ts +2 -3
- package/lib/catalog/priceplan/priceplan.entity.js +8 -11
- package/lib/catalog/priceplan/priceplan.entity.js.map +1 -1
- package/lib/catalog/product/country.entity.d.ts +10 -4
- package/lib/catalog/product/country.entity.js +37 -32
- package/lib/catalog/product/country.entity.js.map +1 -1
- package/lib/catalog/product/priceplan.entity.d.ts +4 -3
- package/lib/catalog/product/priceplan.entity.js +7 -11
- package/lib/catalog/product/priceplan.entity.js.map +1 -1
- package/lib/catalog/product/product.entity.d.ts +6 -6
- package/lib/catalog/product/product.entity.js +33 -34
- package/lib/catalog/product/product.entity.js.map +1 -1
- package/lib/catalog/program/program.entity.d.ts +2 -2
- package/lib/catalog/program/program.entity.js +16 -20
- package/lib/catalog/program/program.entity.js.map +1 -1
- package/lib/catalog/seed/assets/asset.entity.d.ts +6 -7
- package/lib/catalog/seed/assets/asset.entity.js +24 -23
- package/lib/catalog/seed/assets/asset.entity.js.map +1 -1
- package/lib/catalog/seed/courses/course.entity.d.ts +4 -3
- package/lib/catalog/seed/courses/course.entity.js +7 -8
- package/lib/catalog/seed/courses/course.entity.js.map +1 -1
- package/lib/catalog/seed/courses/lesson.entity.d.ts +2 -2
- package/lib/catalog/seed/courses/lesson.entity.js +8 -10
- package/lib/catalog/seed/courses/lesson.entity.js.map +1 -1
- package/lib/catalog/seed/courses/topic.entity.d.ts +2 -2
- package/lib/catalog/seed/courses/topic.entity.js +8 -10
- package/lib/catalog/seed/courses/topic.entity.js.map +1 -1
- package/lib/catalog/seed/expense/category.entity.d.ts +2 -1
- package/lib/catalog/seed/expense/category.entity.js +6 -7
- package/lib/catalog/seed/expense/category.entity.js.map +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/profile/agent/agent.entity.d.ts +6 -12
- package/lib/profile/agent/agent.entity.js +23 -34
- package/lib/profile/agent/agent.entity.js.map +1 -1
- package/lib/profile/agent/asset.entity.d.ts +57 -0
- package/lib/profile/agent/asset.entity.js +95 -0
- package/lib/profile/agent/asset.entity.js.map +1 -0
- package/lib/profile/agent/payout.entity.d.ts +2 -2
- package/lib/profile/agent/payout.entity.js +7 -9
- package/lib/profile/agent/payout.entity.js.map +1 -1
- package/lib/profile/agent/promotion.entity.js +3 -4
- package/lib/profile/agent/promotion.entity.js.map +1 -1
- package/lib/profile/company/company.entity.d.ts +8 -6
- package/lib/profile/company/company.entity.js +38 -33
- package/lib/profile/company/company.entity.js.map +1 -1
- package/lib/profile/company/course/appointment.entity.d.ts +11 -6
- package/lib/profile/company/course/appointment.entity.js +42 -28
- package/lib/profile/company/course/appointment.entity.js.map +1 -1
- package/lib/profile/company/course/course.entity.d.ts +22 -4
- package/lib/profile/company/course/course.entity.js +55 -17
- package/lib/profile/company/course/course.entity.js.map +1 -1
- package/lib/profile/company/course/lesson.entity.d.ts +13 -3
- package/lib/profile/company/course/lesson.entity.js +42 -10
- package/lib/profile/company/course/lesson.entity.js.map +1 -1
- package/lib/profile/company/course/topic.entity.d.ts +7 -0
- package/lib/profile/company/course/topic.entity.js +36 -6
- package/lib/profile/company/course/topic.entity.js.map +1 -1
- package/lib/profile/company/finances/billing/bill.entity.d.ts +2 -1
- package/lib/profile/company/finances/billing/bill.entity.js +5 -6
- package/lib/profile/company/finances/billing/bill.entity.js.map +1 -1
- package/lib/profile/company/finances/billing/item.entity.d.ts +2 -2
- package/lib/profile/company/finances/billing/item.entity.js +4 -5
- package/lib/profile/company/finances/billing/item.entity.js.map +1 -1
- package/lib/profile/company/finances/billing/transaction.entity.d.ts +2 -1
- package/lib/profile/company/finances/billing/transaction.entity.js +10 -9
- package/lib/profile/company/finances/billing/transaction.entity.js.map +1 -1
- package/lib/profile/company/finances/expense/category.entity.js +3 -4
- package/lib/profile/company/finances/expense/category.entity.js.map +1 -1
- package/lib/profile/company/finances/expense/expense.entity.d.ts +2 -1
- package/lib/profile/company/finances/expense/expense.entity.js +9 -12
- package/lib/profile/company/finances/expense/expense.entity.js.map +1 -1
- package/lib/profile/company/finances/handover/handover.entity.js +5 -5
- package/lib/profile/company/finances/handover/handover.entity.js.map +1 -1
- package/lib/profile/company/finances/invoice/invoice.entity.d.ts +2 -2
- package/lib/profile/company/finances/invoice/invoice.entity.js +21 -26
- package/lib/profile/company/finances/invoice/invoice.entity.js.map +1 -1
- package/lib/profile/company/finances/invoice/item.entity.d.ts +2 -1
- package/lib/profile/company/finances/invoice/item.entity.js +5 -6
- package/lib/profile/company/finances/invoice/item.entity.js.map +1 -1
- package/lib/profile/company/finances/payment/method.entity.js +5 -6
- package/lib/profile/company/finances/payment/method.entity.js.map +1 -1
- package/lib/profile/company/instructor/activity.entity.d.ts +33 -0
- package/lib/profile/company/instructor/activity.entity.js +53 -0
- package/lib/profile/company/instructor/activity.entity.js.map +1 -0
- package/lib/profile/company/instructor/calendar-state.entity.d.ts +67 -0
- package/lib/profile/company/instructor/calendar-state.entity.js +75 -0
- package/lib/profile/company/instructor/calendar-state.entity.js.map +1 -0
- package/lib/profile/company/instructor/instructor.entity.d.ts +23 -16
- package/lib/profile/company/instructor/instructor.entity.js +69 -46
- package/lib/profile/company/instructor/instructor.entity.js.map +1 -1
- package/lib/profile/company/instructor/task.entity.js +3 -4
- package/lib/profile/company/instructor/task.entity.js.map +1 -1
- package/lib/profile/company/medical/examination.entity.d.ts +2 -1
- package/lib/profile/company/medical/examination.entity.js +3 -4
- package/lib/profile/company/medical/examination.entity.js.map +1 -1
- package/lib/profile/company/medical/product.entity.d.ts +3 -2
- package/lib/profile/company/medical/product.entity.js +6 -7
- package/lib/profile/company/medical/product.entity.js.map +1 -1
- package/lib/profile/company/product/addon.entity.d.ts +7 -8
- package/lib/profile/company/product/addon.entity.js +42 -38
- package/lib/profile/company/product/addon.entity.js.map +1 -1
- package/lib/profile/company/product/priceplan.entity.d.ts +7 -2
- package/lib/profile/company/product/priceplan.entity.js +10 -5
- package/lib/profile/company/product/priceplan.entity.js.map +1 -1
- package/lib/profile/company/product/product.entity.d.ts +19 -6
- package/lib/profile/company/product/product.entity.js +42 -19
- package/lib/profile/company/product/product.entity.js.map +1 -1
- package/lib/profile/company/product/vehicle.entity.d.ts +2 -1
- package/lib/profile/company/product/vehicle.entity.js +5 -6
- package/lib/profile/company/product/vehicle.entity.js.map +1 -1
- package/lib/profile/instructor/instructor.entity.d.ts +4 -12
- package/lib/profile/instructor/instructor.entity.js +15 -31
- package/lib/profile/instructor/instructor.entity.js.map +1 -1
- package/lib/profile/student/program/licence/licence.entity.d.ts +2 -1
- package/lib/profile/student/program/licence/licence.entity.js +7 -8
- package/lib/profile/student/program/licence/licence.entity.js.map +1 -1
- package/lib/profile/student/program/medical/certificate.entity.d.ts +2 -1
- package/lib/profile/student/program/medical/certificate.entity.js +9 -10
- package/lib/profile/student/program/medical/certificate.entity.js.map +1 -1
- package/lib/profile/student/program/medical/examination.entity.d.ts +2 -2
- package/lib/profile/student/program/medical/examination.entity.js +14 -16
- package/lib/profile/student/program/medical/examination.entity.js.map +1 -1
- package/lib/profile/student/program/program.entity.d.ts +2 -1
- package/lib/profile/student/program/program.entity.js +7 -8
- package/lib/profile/student/program/program.entity.js.map +1 -1
- package/lib/profile/student/program/training/appointment.entity.d.ts +6 -8
- package/lib/profile/student/program/training/appointment.entity.js +12 -13
- package/lib/profile/student/program/training/appointment.entity.js.map +1 -1
- package/lib/profile/student/program/training/exam.entity.d.ts +1 -2
- package/lib/profile/student/program/training/exam.entity.js +10 -12
- package/lib/profile/student/program/training/exam.entity.js.map +1 -1
- package/lib/profile/student/program/training/lesson.entity.js +3 -4
- package/lib/profile/student/program/training/lesson.entity.js.map +1 -1
- package/lib/profile/student/program/training/request.entity.d.ts +2 -1
- package/lib/profile/student/program/training/request.entity.js +11 -14
- package/lib/profile/student/program/training/request.entity.js.map +1 -1
- package/lib/profile/student/program/training/topic.entity.js +6 -8
- package/lib/profile/student/program/training/topic.entity.js.map +1 -1
- package/lib/profile/student/program/training/training.entity.d.ts +3 -4
- package/lib/profile/student/program/training/training.entity.js +26 -31
- package/lib/profile/student/program/training/training.entity.js.map +1 -1
- package/lib/profile/student/program/training/transaction.entity.d.ts +2 -2
- package/lib/profile/student/program/training/transaction.entity.js +12 -14
- package/lib/profile/student/program/training/transaction.entity.js.map +1 -1
- package/lib/profile/student/student.entity.d.ts +4 -11
- package/lib/profile/student/student.entity.js +15 -30
- package/lib/profile/student/student.entity.js.map +1 -1
- package/lib/system/campaign/campaign.entity.d.ts +2 -2
- package/lib/system/campaign/campaign.entity.js +7 -9
- package/lib/system/campaign/campaign.entity.js.map +1 -1
- package/lib/system/campaign/gifcode.entity.d.ts +3 -2
- package/lib/system/campaign/gifcode.entity.js +7 -8
- package/lib/system/campaign/gifcode.entity.js.map +1 -1
- package/lib/system/country/country.entity.d.ts +4 -3
- package/lib/system/country/country.entity.js +8 -11
- package/lib/system/country/country.entity.js.map +1 -1
- package/lib/system/currency/currency.entity.js +3 -4
- package/lib/system/currency/currency.entity.js.map +1 -1
- package/lib/system/driving/category.entity.d.ts +2 -2
- package/lib/system/driving/category.entity.js +10 -14
- package/lib/system/driving/category.entity.js.map +1 -1
- package/lib/system/driving/vehicle.entity.d.ts +2 -1
- package/lib/system/driving/vehicle.entity.js +5 -6
- package/lib/system/driving/vehicle.entity.js.map +1 -1
- package/lib/system/event/event.entity.d.ts +2 -1
- package/lib/system/event/event.entity.js +10 -10
- package/lib/system/event/event.entity.js.map +1 -1
- package/lib/system/event/log.entity.d.ts +13 -12
- package/lib/system/event/log.entity.js +22 -21
- package/lib/system/event/log.entity.js.map +1 -1
- package/lib/system/policy/policy.entity.d.ts +2 -2
- package/lib/system/policy/policy.entity.js +14 -18
- package/lib/system/policy/policy.entity.js.map +1 -1
- package/lib/system/staff/staff.entity.d.ts +2 -1
- package/lib/system/staff/staff.entity.js +9 -10
- package/lib/system/staff/staff.entity.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/user/alert.entity.d.ts +13 -2
- package/lib/user/alert.entity.js +29 -11
- package/lib/user/alert.entity.js.map +1 -1
- package/lib/user/blocked.entity.js +2 -5
- package/lib/user/blocked.entity.js.map +1 -1
- package/lib/user/device.entity.js +3 -4
- package/lib/user/device.entity.js.map +1 -1
- package/lib/user/notification.entity.d.ts +2 -2
- package/lib/user/notification.entity.js +11 -13
- package/lib/user/notification.entity.js.map +1 -1
- package/lib/user/ticket.entity.d.ts +2 -2
- package/lib/user/ticket.entity.js +16 -20
- package/lib/user/ticket.entity.js.map +1 -1
- package/lib/user/user.entity.d.ts +16 -6
- package/lib/user/user.entity.js +94 -50
- package/lib/user/user.entity.js.map +1 -1
- package/lib/user/verification.entity.js +3 -5
- package/lib/user/verification.entity.js.map +1 -1
- package/lib/utils/activity.helper.d.ts +3 -2
- package/lib/utils/activity.helper.js +9 -9
- package/lib/utils/activity.helper.js.map +1 -1
- package/lib/utils/trackable.d.ts +2 -1
- package/lib/utils/trackable.js +4 -3
- package/lib/utils/trackable.js.map +1 -1
- package/package.json +6 -5
|
@@ -0,0 +1,95 @@
|
|
|
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.AgentAssetEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const shared_1 = require("@driveup/shared");
|
|
15
|
+
const common_1 = require("@driveup/common");
|
|
16
|
+
const trackable_1 = require("../../utils/trackable");
|
|
17
|
+
const agent_entity_1 = require("./agent.entity");
|
|
18
|
+
/**
|
|
19
|
+
* Represents an agent profile in the system.
|
|
20
|
+
* Agents are users who promote Driveup services and earn commissions
|
|
21
|
+
* through a unique promotion code. They can receive payouts based on
|
|
22
|
+
* their generated revenue.
|
|
23
|
+
*
|
|
24
|
+
* @extends TrackableEntity<Agent>
|
|
25
|
+
*/
|
|
26
|
+
let AgentAssetEntity = class AgentAssetEntity extends trackable_1.TrackableEntity {
|
|
27
|
+
/**
|
|
28
|
+
* Creates an instance of AgentEntity
|
|
29
|
+
* @param props - Partial properties to initialize the entity
|
|
30
|
+
*/
|
|
31
|
+
constructor(props) {
|
|
32
|
+
super();
|
|
33
|
+
Object.assign(this, props);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Converts the entity to an Agent model instance
|
|
37
|
+
* @returns Agent model with basic information
|
|
38
|
+
*/
|
|
39
|
+
toModel() {
|
|
40
|
+
// TODO: implement in the next version
|
|
41
|
+
return new common_1.Asset();
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Converts the entity to an Agent model instance
|
|
45
|
+
* @returns Agent model with basic information
|
|
46
|
+
*/
|
|
47
|
+
toSummary() {
|
|
48
|
+
// TODO: implement in the next version
|
|
49
|
+
return this.toModel();
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Retrieves activity history for this agent
|
|
53
|
+
* @returns Promise resolving to array of Activity instances tracking creation and updates
|
|
54
|
+
*/
|
|
55
|
+
async getActivities() {
|
|
56
|
+
// TODO: implement in the next version
|
|
57
|
+
const activities = [];
|
|
58
|
+
return activities;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
exports.AgentAssetEntity = AgentAssetEntity;
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)(),
|
|
64
|
+
__metadata("design:type", Number)
|
|
65
|
+
], AgentAssetEntity.prototype, "agentId", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({
|
|
68
|
+
type: 'enum',
|
|
69
|
+
name: 'assetType',
|
|
70
|
+
enum: shared_1.AssetType,
|
|
71
|
+
default: shared_1.AssetType.Image,
|
|
72
|
+
nullable: false
|
|
73
|
+
}),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], AgentAssetEntity.prototype, "type", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.Column)({
|
|
78
|
+
nullable: true,
|
|
79
|
+
default: false
|
|
80
|
+
}),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], AgentAssetEntity.prototype, "title", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)(),
|
|
85
|
+
__metadata("design:type", String)
|
|
86
|
+
], AgentAssetEntity.prototype, "url", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typeorm_1.ManyToOne)(() => agent_entity_1.AgentEntity, agent => agent.assets),
|
|
89
|
+
__metadata("design:type", Promise)
|
|
90
|
+
], AgentAssetEntity.prototype, "agent", void 0);
|
|
91
|
+
exports.AgentAssetEntity = AgentAssetEntity = __decorate([
|
|
92
|
+
(0, typeorm_1.Entity)('agentAssets'),
|
|
93
|
+
__metadata("design:paramtypes", [Object])
|
|
94
|
+
], AgentAssetEntity);
|
|
95
|
+
//# sourceMappingURL=asset.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asset.entity.js","sourceRoot":"","sources":["../../../src/profile/agent/asset.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAoD;AACpD,4CAA4C;AAC5C,4CAAkD;AAClD,qDAAwD;AACxD,iDAA6C;AAE7C;;;;;;;GAOG;AAEI,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,2BAAsB;IA4C3D;;;OAGG;IACH,YAAY,KAAiC;QAC5C,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACH,OAAO;QACN,sCAAsC;QACtC,OAAO,IAAI,cAAK,EAAE,CAAC;IACpB,CAAC;IAED;;;OAGG;IACH,SAAS;QACR,sCAAsC;QACtC,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,aAAa;QAClB,sCAAsC;QACtC,MAAM,UAAU,GAAe,EAAE,CAAC;QAClC,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAA;AAhFY,4CAAgB;AAM5B;IADC,IAAA,gBAAM,GAAE;;iDACO;AAahB;IAPC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,kBAAS;QACf,OAAO,EAAE,kBAAS,CAAC,KAAK;QACxB,QAAQ,EAAE,KAAK;KACf,CAAC;;8CACc;AAUhB;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,KAAK;KACd,CAAC;;+CACY;AAOd;IADC,IAAA,gBAAM,GAAE;;6CACG;AAMZ;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,0BAAW,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;;+CACzB;2BA1Cf,gBAAgB;IAD5B,IAAA,gBAAM,EAAC,aAAa,CAAC;;GACT,gBAAgB,CAgF5B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Activity,
|
|
1
|
+
import { StatusType } from '@driveup/shared';
|
|
2
|
+
import { Activity, BankAccount, Payout } from '@driveup/common';
|
|
3
3
|
import { AgentEntity } from './agent.entity';
|
|
4
4
|
import { AgentPromotionEntity } from './promotion.entity';
|
|
5
5
|
import { TrackableEntity } from '../../utils/trackable';
|
|
@@ -11,8 +11,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AgentPayoutEntity = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
|
+
const shared_1 = require("@driveup/shared");
|
|
14
15
|
const common_1 = require("@driveup/common");
|
|
15
|
-
const common_2 = require("@driveup/common");
|
|
16
16
|
const staff_entity_1 = require("../../system/staff/staff.entity");
|
|
17
17
|
const agent_entity_1 = require("./agent.entity");
|
|
18
18
|
const promotion_entity_1 = require("./promotion.entity");
|
|
@@ -60,10 +60,8 @@ let AgentPayoutEntity = class AgentPayoutEntity extends trackable_1.TrackableEnt
|
|
|
60
60
|
*/
|
|
61
61
|
async getActivities() {
|
|
62
62
|
const activities = [];
|
|
63
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy,
|
|
64
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.
|
|
65
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.paidBy, common_2.ActivityType.paidBy, staff_entity_1.StaffEntity));
|
|
66
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.paidOn, common_2.ActivityType.paidOn));
|
|
63
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy, this.createdOn, shared_1.ActivityType.created, staff_entity_1.StaffEntity));
|
|
64
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.updatedBy, this.updatedOn, shared_1.ActivityType.updated, staff_entity_1.StaffEntity));
|
|
67
65
|
return activities.filter(a => a);
|
|
68
66
|
}
|
|
69
67
|
};
|
|
@@ -76,11 +74,11 @@ __decorate([
|
|
|
76
74
|
(0, typeorm_1.Column)({
|
|
77
75
|
type: 'enum',
|
|
78
76
|
enum: [
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
shared_1.StatusType.Pending,
|
|
78
|
+
shared_1.StatusType.Paid,
|
|
79
|
+
shared_1.StatusType.Failed
|
|
82
80
|
],
|
|
83
|
-
default:
|
|
81
|
+
default: shared_1.StatusType.Pending,
|
|
84
82
|
nullable: false
|
|
85
83
|
}),
|
|
86
84
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payout.entity.js","sourceRoot":"","sources":["../../../src/profile/agent/payout.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA+D;AAC/D,
|
|
1
|
+
{"version":3,"file":"payout.entity.js","sourceRoot":"","sources":["../../../src/profile/agent/payout.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA+D;AAC/D,4CAA2D;AAC3D,4CAAgE;AAChE,kEAA8D;AAC9D,iDAA6C;AAC7C,yDAA0D;AAC1D,qDAAwD;AACxD,iEAAyD;AAEzD;;;;;;GAMG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,2BAAuB;IAwE7D;;;OAGG;IACH,YAAY,KAAkC;QAC7C,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,OAAO;QACZ,OAAO,IAAI,eAAM,CAAC;YACjB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,WAA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AC;8BACW,oBAAW;sDAAC;AAMzB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BAClC,IAAI;iDAAC;AAMb;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;iDAC3B;AAMf;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,0BAAW,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;;gDACzB;AAM5B;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAoB,EAAE,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC;;qDACzB;4BAtEhC,iBAAiB;IAD7B,IAAA,gBAAM,EAAC,cAAc,CAAC;;GACV,iBAAiB,CAiH7B"}
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AgentPromotionEntity = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
|
+
const shared_1 = require("@driveup/shared");
|
|
14
15
|
const common_1 = require("@driveup/common");
|
|
15
16
|
const agent_entity_1 = require("./agent.entity");
|
|
16
17
|
const payout_entity_1 = require("./payout.entity");
|
|
@@ -63,10 +64,8 @@ let AgentPromotionEntity = class AgentPromotionEntity extends trackable_1.Tracka
|
|
|
63
64
|
*/
|
|
64
65
|
async getActivities() {
|
|
65
66
|
const activities = [];
|
|
66
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy,
|
|
67
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.
|
|
68
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.updatedBy, common_1.ActivityType.updatedBy));
|
|
69
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.updatedOn, common_1.ActivityType.updatedOn));
|
|
67
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy, this.createdOn, shared_1.ActivityType.created));
|
|
68
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.updatedBy, this.updatedOn, shared_1.ActivityType.updated));
|
|
70
69
|
return activities.filter(a => a);
|
|
71
70
|
}
|
|
72
71
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promotion.entity.js","sourceRoot":"","sources":["../../../src/profile/agent/promotion.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"promotion.entity.js","sourceRoot":"","sources":["../../../src/profile/agent/promotion.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA0E;AAC1E,4CAA+C;AAC/C,4CAA+D;AAC/D,iDAA6C;AAC7C,mDAAoD;AACpD,8DAA0D;AAC1D,uFAA8F;AAC9F,qDAAwD;AACxD,iEAAyD;AAEzD;;;;;;GAMG;AAEI,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,2BAA2B;IA6EpE;;;OAGG;IACH,YAAY,KAAqC;QAChD,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,OAAO;QACZ,OAAO,IAAI,mBAAU,CAAC;YACrB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,eAAM,CAAC;gBAClB,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,OAAO,EAAE,IAAI,CAAC,OAAO;aACrB,CAAC;YACF,QAAQ,EAAE,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE;SAC5C,CAAC,CAAA;IACH,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,SAAS;QACd,OAAO,MAAM,IAAI,CAAC,OAAO,EAAE,C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AO,CAAC,eAAe,CAAC;;qDACnC;AAOhC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,iCAAiB,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC;;oDAC7B;AAOnC;IAFC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,iDAA4B,EAAE,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,cAAc,CAAC;IACvF,IAAA,oBAAU,GAAE;;yDACsC;+BA3EvC,oBAAoB;IADhC,IAAA,gBAAM,EAAC,iBAAiB,CAAC;;GACb,oBAAoB,CAyHhC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { WorkingHours, Holiday, Address
|
|
3
|
-
import { BankAccount, Tax, Link, Customer } from '@driveup/common';
|
|
1
|
+
import { AccountStatus, Language, AddonType } from '@driveup/shared';
|
|
2
|
+
import { Company, Activity, WorkingHours, Holiday, Address } from '@driveup/common';
|
|
3
|
+
import { BankAccount, Tax, Link, Customer, Preference } from '@driveup/common';
|
|
4
4
|
import { CountryEntity } from '../../system/country/country.entity';
|
|
5
5
|
import { CompanyExpenseEntity } from './finances/expense/expense.entity';
|
|
6
6
|
import { CompanyExpenseCategoryEntity } from './finances/expense/category.entity';
|
|
@@ -12,6 +12,7 @@ import { CompanyProductEntity } from './product/product.entity';
|
|
|
12
12
|
import { CompanyInstructorEntity } from './instructor/instructor.entity';
|
|
13
13
|
import { AgentPromotionEntity } from '../agent/promotion.entity';
|
|
14
14
|
import { TrackableEntity } from '../../utils/trackable';
|
|
15
|
+
import { CompanyAddonEntity } from './product/addon.entity';
|
|
15
16
|
/**
|
|
16
17
|
* Represents a driving school company in the system.
|
|
17
18
|
* Companies offer training products, manage instructors and students,
|
|
@@ -32,7 +33,7 @@ export declare class CompanyEntity extends TrackableEntity<Company> {
|
|
|
32
33
|
uid: string;
|
|
33
34
|
/**
|
|
34
35
|
* Account status of the company
|
|
35
|
-
* @default AccountStatus.
|
|
36
|
+
* @default AccountStatus.Pending
|
|
36
37
|
*/
|
|
37
38
|
status: AccountStatus;
|
|
38
39
|
/**
|
|
@@ -137,6 +138,7 @@ export declare class CompanyEntity extends TrackableEntity<Company> {
|
|
|
137
138
|
* Company products relation
|
|
138
139
|
*/
|
|
139
140
|
products: Promise<CompanyProductEntity[]>;
|
|
141
|
+
addons: Promise<CompanyAddonEntity[]>;
|
|
140
142
|
/**
|
|
141
143
|
* Company bills relation
|
|
142
144
|
*/
|
|
@@ -235,7 +237,7 @@ export declare class CompanyEntity extends TrackableEntity<Company> {
|
|
|
235
237
|
* Log company event
|
|
236
238
|
* @param event Event type
|
|
237
239
|
* @param metadata Content render data (in company language)
|
|
238
|
-
* @param entityId Optional related entity ID
|
|
239
240
|
*/
|
|
240
|
-
log(event: string, metadata?: any
|
|
241
|
+
log(event: string, metadata?: any): Promise<void>;
|
|
242
|
+
getAddonByType(type: AddonType): Promise<CompanyAddonEntity>;
|
|
241
243
|
}
|
|
@@ -11,9 +11,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CompanyEntity = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
|
+
const shared_1 = require("@driveup/shared");
|
|
14
15
|
const common_1 = require("@driveup/common");
|
|
15
16
|
const common_2 = require("@driveup/common");
|
|
16
|
-
const common_3 = require("@driveup/common");
|
|
17
17
|
const country_entity_1 = require("../../system/country/country.entity");
|
|
18
18
|
const log_entity_1 = require("../../system/event/log.entity");
|
|
19
19
|
const expense_entity_1 = require("./finances/expense/expense.entity");
|
|
@@ -27,6 +27,7 @@ const instructor_entity_1 = require("./instructor/instructor.entity");
|
|
|
27
27
|
const promotion_entity_1 = require("../agent/promotion.entity");
|
|
28
28
|
const trackable_1 = require("../../utils/trackable");
|
|
29
29
|
const activity_helper_1 = require("../../utils/activity.helper");
|
|
30
|
+
const addon_entity_1 = require("./product/addon.entity");
|
|
30
31
|
/**
|
|
31
32
|
* Represents a driving school company in the system.
|
|
32
33
|
* Companies offer training products, manage instructors and students,
|
|
@@ -82,16 +83,16 @@ let CompanyEntity = class CompanyEntity extends trackable_1.TrackableEntity {
|
|
|
82
83
|
*/
|
|
83
84
|
toModelWithDetails() {
|
|
84
85
|
const company = this.toModel();
|
|
85
|
-
company.address =
|
|
86
|
-
company.bankAccount =
|
|
87
|
-
company.tax =
|
|
86
|
+
company.address = common_1.Address.toInstance(this.address);
|
|
87
|
+
company.bankAccount = common_2.BankAccount.toInstance(this.bankAccount);
|
|
88
|
+
company.tax = common_2.Tax.toInstance(this.tax);
|
|
88
89
|
company.email = this.email;
|
|
89
90
|
company.homepage = this.homepage;
|
|
90
91
|
company.rating = this.rating;
|
|
91
92
|
company.links = this.links;
|
|
92
|
-
company.workingHours = this.workingHours?.map(
|
|
93
|
-
company.holidays = this.holidays?.map(
|
|
94
|
-
company.locations = this.locations?.map(
|
|
93
|
+
company.workingHours = this.workingHours?.map(common_1.WorkingHours.toInstance);
|
|
94
|
+
company.holidays = this.holidays?.map(common_1.Holiday.toInstance);
|
|
95
|
+
company.locations = this.locations?.map(common_1.Address.toInstance);
|
|
95
96
|
company.preferences = this.preferences?.map(common_2.Preference.toInstance);
|
|
96
97
|
return company;
|
|
97
98
|
}
|
|
@@ -100,11 +101,11 @@ let CompanyEntity = class CompanyEntity extends trackable_1.TrackableEntity {
|
|
|
100
101
|
* @returns Customer model with company information
|
|
101
102
|
*/
|
|
102
103
|
toCustomer() {
|
|
103
|
-
return new
|
|
104
|
+
return new common_2.Customer({
|
|
104
105
|
id: this.id,
|
|
105
106
|
name: this.name,
|
|
106
107
|
imageUrl: this.logoUrl,
|
|
107
|
-
address:
|
|
108
|
+
address: common_1.Address.toInstance(this.address),
|
|
108
109
|
phone: this.phone,
|
|
109
110
|
email: this.email,
|
|
110
111
|
});
|
|
@@ -116,7 +117,7 @@ let CompanyEntity = class CompanyEntity extends trackable_1.TrackableEntity {
|
|
|
116
117
|
async getOwner() {
|
|
117
118
|
return await instructor_entity_1.CompanyInstructorEntity.findOneBy({
|
|
118
119
|
companyId: this.id,
|
|
119
|
-
role:
|
|
120
|
+
role: shared_1.Role.Owner
|
|
120
121
|
});
|
|
121
122
|
}
|
|
122
123
|
/**
|
|
@@ -124,18 +125,18 @@ let CompanyEntity = class CompanyEntity extends trackable_1.TrackableEntity {
|
|
|
124
125
|
* @param active - Optional flag to filter only active instructors
|
|
125
126
|
* @returns Promise resolving to array of CompanyInstructorEntity
|
|
126
127
|
*/
|
|
127
|
-
async getInstructors(active) {
|
|
128
|
+
async getInstructors(active = true) {
|
|
128
129
|
const instructors = (await this.instructors) || [];
|
|
129
|
-
return active ? instructors.filter(i => i.status ===
|
|
130
|
+
return active ? instructors.filter(i => i.status === shared_1.AccountStatus.Active) : instructors;
|
|
130
131
|
}
|
|
131
132
|
/**
|
|
132
133
|
* Retrieves all managers (owners and managers) associated with this company
|
|
133
134
|
* @param active - Optional flag to filter only active managers
|
|
134
135
|
* @returns Promise resolving to array of CompanyInstructorEntity with manager roles
|
|
135
136
|
*/
|
|
136
|
-
async getManagers(active) {
|
|
137
|
+
async getManagers(active = true) {
|
|
137
138
|
const instructors = await this.getInstructors(active);
|
|
138
|
-
const managerRoles = [
|
|
139
|
+
const managerRoles = [shared_1.Role.Owner, shared_1.Role.Manager];
|
|
139
140
|
return instructors?.filter(i => managerRoles.includes(i.role));
|
|
140
141
|
}
|
|
141
142
|
/**
|
|
@@ -155,7 +156,7 @@ let CompanyEntity = class CompanyEntity extends trackable_1.TrackableEntity {
|
|
|
155
156
|
async getAgentEarning() {
|
|
156
157
|
return await bill_entity_1.CompanyBillEntity.sum('agentProfit', {
|
|
157
158
|
companyId: this.id,
|
|
158
|
-
status:
|
|
159
|
+
status: shared_1.BillStatus.Paid
|
|
159
160
|
});
|
|
160
161
|
}
|
|
161
162
|
/**
|
|
@@ -174,29 +175,29 @@ let CompanyEntity = class CompanyEntity extends trackable_1.TrackableEntity {
|
|
|
174
175
|
*/
|
|
175
176
|
async getActivities() {
|
|
176
177
|
const activities = [];
|
|
177
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy,
|
|
178
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.
|
|
179
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.
|
|
180
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.updatedOn, common_1.ActivityType.updatedOn));
|
|
181
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.closedBy, common_1.ActivityType.closedBy));
|
|
182
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.closedOn, common_1.ActivityType.closedOn));
|
|
178
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy, this.createdOn, shared_1.ActivityType.created));
|
|
179
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.updatedBy, this.updatedOn, shared_1.ActivityType.updated));
|
|
180
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.closedBy, this.closedOn, shared_1.ActivityType.updated));
|
|
183
181
|
return activities.filter(a => a);
|
|
184
182
|
}
|
|
185
183
|
/**
|
|
186
184
|
* Log company event
|
|
187
185
|
* @param event Event type
|
|
188
186
|
* @param metadata Content render data (in company language)
|
|
189
|
-
* @param entityId Optional related entity ID
|
|
190
187
|
*/
|
|
191
|
-
async log(event, metadata
|
|
188
|
+
async log(event, metadata) {
|
|
192
189
|
await log_entity_1.LogEntity.from({
|
|
193
|
-
type:
|
|
190
|
+
type: shared_1.LogType.Company,
|
|
191
|
+
profile: shared_1.ProfileType.Company,
|
|
194
192
|
event: event,
|
|
195
|
-
entityId:
|
|
196
|
-
profile: { type: common_1.ProfileType.Company, id: this.id },
|
|
193
|
+
entityId: this.id,
|
|
197
194
|
content: log_entity_1.LogEntity.toCompanyContent(event, this.language, metadata)
|
|
198
195
|
});
|
|
199
196
|
}
|
|
197
|
+
async getAddonByType(type) {
|
|
198
|
+
const addons = await this.addons;
|
|
199
|
+
return addons?.find(i => i.type === type);
|
|
200
|
+
}
|
|
200
201
|
};
|
|
201
202
|
exports.CompanyEntity = CompanyEntity;
|
|
202
203
|
__decorate([
|
|
@@ -211,8 +212,8 @@ __decorate([
|
|
|
211
212
|
__decorate([
|
|
212
213
|
(0, typeorm_1.Column)({
|
|
213
214
|
type: 'enum',
|
|
214
|
-
enum:
|
|
215
|
-
default:
|
|
215
|
+
enum: shared_1.AccountStatus,
|
|
216
|
+
default: shared_1.AccountStatus.Pending,
|
|
216
217
|
nullable: false
|
|
217
218
|
}),
|
|
218
219
|
__metadata("design:type", String)
|
|
@@ -234,8 +235,8 @@ __decorate([
|
|
|
234
235
|
__decorate([
|
|
235
236
|
(0, typeorm_1.Column)({
|
|
236
237
|
type: 'enum',
|
|
237
|
-
enum:
|
|
238
|
-
default:
|
|
238
|
+
enum: shared_1.Language,
|
|
239
|
+
default: shared_1.Language.De,
|
|
239
240
|
nullable: true
|
|
240
241
|
}),
|
|
241
242
|
__metadata("design:type", String)
|
|
@@ -267,7 +268,7 @@ __decorate([
|
|
|
267
268
|
nullable: true,
|
|
268
269
|
default: null
|
|
269
270
|
}),
|
|
270
|
-
__metadata("design:type",
|
|
271
|
+
__metadata("design:type", common_1.Address)
|
|
271
272
|
], CompanyEntity.prototype, "address", void 0);
|
|
272
273
|
__decorate([
|
|
273
274
|
(0, typeorm_1.Column)({
|
|
@@ -275,7 +276,7 @@ __decorate([
|
|
|
275
276
|
nullable: true,
|
|
276
277
|
default: null
|
|
277
278
|
}),
|
|
278
|
-
__metadata("design:type",
|
|
279
|
+
__metadata("design:type", common_2.BankAccount)
|
|
279
280
|
], CompanyEntity.prototype, "bankAccount", void 0);
|
|
280
281
|
__decorate([
|
|
281
282
|
(0, typeorm_1.Column)({
|
|
@@ -346,7 +347,7 @@ __decorate([
|
|
|
346
347
|
nullable: true,
|
|
347
348
|
default: null
|
|
348
349
|
}),
|
|
349
|
-
__metadata("design:type",
|
|
350
|
+
__metadata("design:type", common_2.Tax)
|
|
350
351
|
], CompanyEntity.prototype, "tax", void 0);
|
|
351
352
|
__decorate([
|
|
352
353
|
(0, typeorm_1.Column)({
|
|
@@ -388,6 +389,10 @@ __decorate([
|
|
|
388
389
|
(0, typeorm_1.OneToMany)(() => product_entity_1.CompanyProductEntity, product => product.company),
|
|
389
390
|
__metadata("design:type", Promise)
|
|
390
391
|
], CompanyEntity.prototype, "products", void 0);
|
|
392
|
+
__decorate([
|
|
393
|
+
(0, typeorm_1.OneToMany)(() => addon_entity_1.CompanyAddonEntity, addon => addon.company),
|
|
394
|
+
__metadata("design:type", Promise)
|
|
395
|
+
], CompanyEntity.prototype, "addons", void 0);
|
|
391
396
|
__decorate([
|
|
392
397
|
(0, typeorm_1.OneToMany)(() => bill_entity_1.CompanyBillEntity, bill => bill.company),
|
|
393
398
|
__metadata("design:type", Promise)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"company.entity.js","sourceRoot":"","sources":["../../../src/profile/company/company.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"company.entity.js","sourceRoot":"","sources":["../../../src/profile/company/company.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA0E;AAC1E,4CAA2H;AAC3H,4CAAoF;AACpF,4CAA+E;AAC/E,wEAAoE;AACpE,8DAA0D;AAC1D,sEAAyE;AACzE,wEAAkF;AAClF,yEAA4E;AAC5E,sEAAyE;AACzE,oEAA8E;AAC9E,gEAAmE;AACnE,6DAAgE;AAChE,sEAAyE;AACzE,gEAAiE;AACjE,qDAAwD;AACxD,iEAAyD;AACzD,yDAA4D;AAE5D;;;;;;;GAOG;AAEI,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,2BAAwB;IAgT1D;;;OAGG;IACH,YAAY,KAA8B;QACzC,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;OA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ADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAqB,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;;gDACzB;AAM5C;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAoB,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;;+CACxB;AAM1C;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAoB,EAAE,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC;;sDACrB;wBA9SrC,aAAa;IADzB,IAAA,gBAAM,EAAC,WAAW,CAAC;;GACP,aAAa,CA8dzB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Activity, RecurringAppointment
|
|
2
|
-
import { IDateUpdate, IDateAssignment, IDateDuration } from '@driveup/common';
|
|
1
|
+
import { Activity, RecurringAppointment } from '@driveup/common';
|
|
3
2
|
import { CompanyCourseLessonEntity } from './lesson.entity';
|
|
4
3
|
import { StudentTrainingAppointmentEntity } from '../../student/program/training/appointment.entity';
|
|
5
4
|
import { CompanyInstructorEntity } from '../instructor/instructor.entity';
|
|
6
5
|
import { TrackableEntity } from '../../../utils/trackable';
|
|
6
|
+
import { IDateAssignment, IDateDuration, IDateUpdate, WeekDay } from '@driveup/shared';
|
|
7
7
|
/**
|
|
8
8
|
* Represents a series of training appointment offers managed by the company.
|
|
9
9
|
*
|
|
@@ -26,7 +26,7 @@ import { TrackableEntity } from '../../../utils/trackable';
|
|
|
26
26
|
* @see {@link CompanyCourseLessonEntity} for the associated course lesson
|
|
27
27
|
* @see {@link StudentTrainingEntity} for student bookings
|
|
28
28
|
*/
|
|
29
|
-
export declare class
|
|
29
|
+
export declare class CompanyCourseScheduleEntity extends TrackableEntity<RecurringAppointment> {
|
|
30
30
|
/**
|
|
31
31
|
* Company course lesson
|
|
32
32
|
*/
|
|
@@ -85,13 +85,14 @@ export declare class CompanyCourseAppointmentEntity extends TrackableEntity<Recu
|
|
|
85
85
|
instructor: Promise<CompanyInstructorEntity>;
|
|
86
86
|
/**
|
|
87
87
|
* Student training appointments relation
|
|
88
|
+
* - Will not be used for driving courses
|
|
88
89
|
*/
|
|
89
|
-
|
|
90
|
+
studentSchedule: Promise<StudentTrainingAppointmentEntity[]>;
|
|
90
91
|
/**
|
|
91
|
-
* Creates a new
|
|
92
|
+
* Creates a new CompanyCourseScheduleEntity instance
|
|
92
93
|
* @param props - Partial properties to initialize the entity with
|
|
93
94
|
*/
|
|
94
|
-
constructor(props?: Partial<
|
|
95
|
+
constructor(props?: Partial<CompanyCourseScheduleEntity>);
|
|
95
96
|
/**
|
|
96
97
|
* Converts the entity to a RecurringAppointment model instance
|
|
97
98
|
* @returns Promise resolving to RecurringAppointment model with lesson, instructor, and scheduling details
|
|
@@ -108,4 +109,8 @@ export declare class CompanyCourseAppointmentEntity extends TrackableEntity<Recu
|
|
|
108
109
|
* @returns Promise resolving to array of Activity objects filtered to exclude null values
|
|
109
110
|
*/
|
|
110
111
|
getActivities(): Promise<Activity[]>;
|
|
112
|
+
getCompany(): Promise<import("../company.entity").CompanyEntity>;
|
|
113
|
+
getCourse(): Promise<import("./course.entity").CompanyCourseEntity>;
|
|
114
|
+
getInstructor(): Promise<CompanyInstructorEntity>;
|
|
115
|
+
getInstructorByDate(date: Date): Promise<CompanyInstructorEntity>;
|
|
111
116
|
}
|