@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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CompanyInvoiceEntity } from './invoice.entity';
|
|
2
|
-
import {
|
|
2
|
+
import { ProductType } from '@driveup/shared';
|
|
3
|
+
import { Activity, InvoiceItem } from '@driveup/common';
|
|
3
4
|
import { TrackableEntity } from '../../../../utils/trackable';
|
|
4
5
|
export declare class CompanyInvoiceItemEntity extends TrackableEntity<InvoiceItem> {
|
|
5
6
|
invoiceId: number;
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.CompanyInvoiceItemEntity = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const invoice_entity_1 = require("./invoice.entity");
|
|
15
|
+
const shared_1 = require("@driveup/shared");
|
|
15
16
|
const common_1 = require("@driveup/common");
|
|
16
17
|
const trackable_1 = require("../../../../utils/trackable");
|
|
17
18
|
const activity_helper_1 = require("../../../../utils/activity.helper");
|
|
@@ -36,10 +37,8 @@ let CompanyInvoiceItemEntity = class CompanyInvoiceItemEntity extends trackable_
|
|
|
36
37
|
}
|
|
37
38
|
async getActivities() {
|
|
38
39
|
const activities = [];
|
|
39
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy,
|
|
40
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.
|
|
41
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.updatedBy, common_1.ActivityType.updatedBy));
|
|
42
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.updatedOn, common_1.ActivityType.updatedOn));
|
|
40
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy, this.createdOn, shared_1.ActivityType.created));
|
|
41
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.updatedBy, this.updatedOn, shared_1.ActivityType.updated));
|
|
43
42
|
return activities.filter(a => a);
|
|
44
43
|
}
|
|
45
44
|
};
|
|
@@ -109,8 +108,8 @@ __decorate([
|
|
|
109
108
|
__decorate([
|
|
110
109
|
(0, typeorm_1.Column)({
|
|
111
110
|
type: 'enum',
|
|
112
|
-
enum:
|
|
113
|
-
default:
|
|
111
|
+
enum: shared_1.ProductType,
|
|
112
|
+
default: shared_1.ProductType.DrivingCar,
|
|
114
113
|
nullable: true,
|
|
115
114
|
}),
|
|
116
115
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item.entity.js","sourceRoot":"","sources":["../../../../../src/profile/company/finances/invoice/item.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAoD;AACpD,qDAAwD;AACxD,
|
|
1
|
+
{"version":3,"file":"item.entity.js","sourceRoot":"","sources":["../../../../../src/profile/company/finances/invoice/item.entity.ts"],"names":[],"mappings":"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"}
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CompanyPaymentMethodEntity = 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 company_entity_1 = require("../../company.entity");
|
|
16
17
|
const transaction_entity_1 = require("../billing/transaction.entity");
|
|
@@ -41,16 +42,14 @@ let CompanyPaymentMethodEntity = class CompanyPaymentMethodEntity extends tracka
|
|
|
41
42
|
.createQueryBuilder('t')
|
|
42
43
|
.leftJoinAndSelect('t.bill', 'bill')
|
|
43
44
|
.where('t.paymentMethodId = :id', { id: this.id })
|
|
44
|
-
.andWhere('t.status = :status', { status:
|
|
45
|
-
.andWhere('bill.status = :billStatus', { billStatus:
|
|
45
|
+
.andWhere('t.status = :status', { status: shared_1.StatusType.Failed })
|
|
46
|
+
.andWhere('bill.status = :billStatus', { billStatus: shared_1.BillStatus.Unpaid })
|
|
46
47
|
.getMany();
|
|
47
48
|
}
|
|
48
49
|
async getActivities() {
|
|
49
50
|
const activities = [];
|
|
50
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy,
|
|
51
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.
|
|
52
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.updatedBy, common_1.ActivityType.updatedBy));
|
|
53
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.updatedOn, common_1.ActivityType.updatedOn));
|
|
51
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy, this.createdOn, shared_1.ActivityType.created));
|
|
52
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.updatedBy, this.updatedOn, shared_1.ActivityType.updated));
|
|
54
53
|
return activities.filter(a => a);
|
|
55
54
|
}
|
|
56
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method.entity.js","sourceRoot":"","sources":["../../../../../src/profile/company/finances/payment/method.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAyE;AACzE,
|
|
1
|
+
{"version":3,"file":"method.entity.js","sourceRoot":"","sources":["../../../../../src/profile/company/finances/payment/method.entity.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CompanyInstructorEntity } from "./instructor.entity";
|
|
2
|
+
export declare class CompanyInstructorActivityEntity {
|
|
3
|
+
/**
|
|
4
|
+
* Primary key - auto-generated sequential ID
|
|
5
|
+
*/
|
|
6
|
+
id: number;
|
|
7
|
+
/**
|
|
8
|
+
* The date when the entry was created
|
|
9
|
+
*/
|
|
10
|
+
createdOn: Date;
|
|
11
|
+
/**
|
|
12
|
+
* Company instructor id related to the activity
|
|
13
|
+
*/
|
|
14
|
+
instructorId: number;
|
|
15
|
+
/**
|
|
16
|
+
* Business event associated with the activity.
|
|
17
|
+
* - Use with the related enums (InstructorAccountEvents, InstructorProfileEvents, etc.)
|
|
18
|
+
*/
|
|
19
|
+
event: string;
|
|
20
|
+
/**
|
|
21
|
+
* The date of the activity
|
|
22
|
+
*/
|
|
23
|
+
date: Date;
|
|
24
|
+
/**
|
|
25
|
+
* ID of the company instructor who submitted the activity
|
|
26
|
+
*/
|
|
27
|
+
submittedBy: number;
|
|
28
|
+
/**
|
|
29
|
+
* Related company instructor of the activity
|
|
30
|
+
*/
|
|
31
|
+
instructor: Promise<CompanyInstructorEntity>;
|
|
32
|
+
constructor(props?: Partial<CompanyInstructorActivityEntity>);
|
|
33
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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.CompanyInstructorActivityEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const instructor_entity_1 = require("./instructor.entity");
|
|
15
|
+
let CompanyInstructorActivityEntity = class CompanyInstructorActivityEntity {
|
|
16
|
+
constructor(props) {
|
|
17
|
+
Object.assign(this, props);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
exports.CompanyInstructorActivityEntity = CompanyInstructorActivityEntity;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], CompanyInstructorActivityEntity.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
27
|
+
__metadata("design:type", Date)
|
|
28
|
+
], CompanyInstructorActivityEntity.prototype, "createdOn", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)(),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], CompanyInstructorActivityEntity.prototype, "instructorId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], CompanyInstructorActivityEntity.prototype, "event", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)(),
|
|
39
|
+
__metadata("design:type", Date)
|
|
40
|
+
], CompanyInstructorActivityEntity.prototype, "date", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)(),
|
|
43
|
+
__metadata("design:type", Number)
|
|
44
|
+
], CompanyInstructorActivityEntity.prototype, "submittedBy", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.ManyToOne)(() => instructor_entity_1.CompanyInstructorEntity, instructor => instructor.activities),
|
|
47
|
+
__metadata("design:type", Promise)
|
|
48
|
+
], CompanyInstructorActivityEntity.prototype, "instructor", void 0);
|
|
49
|
+
exports.CompanyInstructorActivityEntity = CompanyInstructorActivityEntity = __decorate([
|
|
50
|
+
(0, typeorm_1.Entity)('companyInstructorActivities'),
|
|
51
|
+
__metadata("design:paramtypes", [Object])
|
|
52
|
+
], CompanyInstructorActivityEntity);
|
|
53
|
+
//# sourceMappingURL=activity.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity.entity.js","sourceRoot":"","sources":["../../../../src/profile/company/instructor/activity.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA8F;AAC9F,2DAA8D;AAGvD,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IA6C3C,YAAY,KAAgD;QAC3D,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD,CAAA;AAhDY,0EAA+B;AAM3C;IADC,IAAA,gCAAsB,GAAE;;2DACd;AAMX;IADC,IAAA,0BAAgB,GAAE;8BACR,IAAI;kEAAC;AAMhB;IADC,IAAA,gBAAM,GAAE;;qEACY;AAOrB;IADC,IAAA,gBAAM,GAAE;;8DACK;AAMd;IADC,IAAA,gBAAM,GAAE;8BACH,IAAI;6DAAC;AAMX;IADC,IAAA,gBAAM,GAAE;;oEACW;AAMpB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,2CAAuB,EAAE,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;;mEACjC;0CA3CjC,+BAA+B;IAD3C,IAAA,gBAAM,EAAC,6BAA6B,CAAC;;GACzB,+BAA+B,CAgD3C"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { CompanyInstructorEntity } from './instructor.entity';
|
|
2
|
+
/**
|
|
3
|
+
* Instructor Shared Calendar State Entity
|
|
4
|
+
* - Represents the state of an instructor's shared calendar (busy/public)
|
|
5
|
+
* - Contains information about which appointments are active and which have been canceled
|
|
6
|
+
*/
|
|
7
|
+
export declare class InstructorSharedCalendarStateEntity {
|
|
8
|
+
/**
|
|
9
|
+
* Primary key - auto-generated sequential ID
|
|
10
|
+
*/
|
|
11
|
+
id: number;
|
|
12
|
+
/**
|
|
13
|
+
* Timestamp when the entity was created
|
|
14
|
+
* Automatically set by TypeORM
|
|
15
|
+
*/
|
|
16
|
+
createdOn: Date;
|
|
17
|
+
/**
|
|
18
|
+
* Timestamp when the entity was last updated
|
|
19
|
+
* Automatically updated by TypeORM
|
|
20
|
+
*/
|
|
21
|
+
updatedOn: Date;
|
|
22
|
+
/**
|
|
23
|
+
* Timestamp when the entity was soft-deleted
|
|
24
|
+
* When set, the entity is excluded from normal queries
|
|
25
|
+
*/
|
|
26
|
+
deletedOn: Date;
|
|
27
|
+
/**
|
|
28
|
+
* Unique identifier for this calendar state entry
|
|
29
|
+
* - generated as a UUID
|
|
30
|
+
* - Is used in the calendar sharing URLs to identify the specific calendar state (calendar link : `api.com/shared/calendar/instructor/{this.uid}`)
|
|
31
|
+
*/
|
|
32
|
+
uid: string;
|
|
33
|
+
/**
|
|
34
|
+
* Whether or not the titles and details of appointments are visible to the public
|
|
35
|
+
* - true: titles and details are visible
|
|
36
|
+
* - false: titles and details are hidden
|
|
37
|
+
*/
|
|
38
|
+
public: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Instructor ID
|
|
41
|
+
* - references UserEntity.id
|
|
42
|
+
* - Each will have two entries, one for busy state and one for public state
|
|
43
|
+
*/
|
|
44
|
+
instructorId: number;
|
|
45
|
+
/**
|
|
46
|
+
* UIDs of appointments currently considered ACTIVE
|
|
47
|
+
* - the keys are the UIDs, the values are objects with startDate and endDate as ISO strings
|
|
48
|
+
*/
|
|
49
|
+
activeUids: Record<string, {
|
|
50
|
+
startDate: string;
|
|
51
|
+
endDate: string;
|
|
52
|
+
}>;
|
|
53
|
+
/**
|
|
54
|
+
* Tombstones: uid -> ISO timestamp when cancelled
|
|
55
|
+
* - the keys are the UIDs of cancelled appointments
|
|
56
|
+
* - the startDate and endDate fields are ISO strings representing the original start and end dates of the cancelled appointment
|
|
57
|
+
*/
|
|
58
|
+
canceledUids: Record<string, {
|
|
59
|
+
startDate: string;
|
|
60
|
+
endDate: string;
|
|
61
|
+
canceledOn: string;
|
|
62
|
+
}>;
|
|
63
|
+
/************************* Relations *************************/
|
|
64
|
+
instructor: Promise<CompanyInstructorEntity>;
|
|
65
|
+
/************************* Methods *************************/
|
|
66
|
+
constructor(props?: Partial<InstructorSharedCalendarStateEntity>);
|
|
67
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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.InstructorSharedCalendarStateEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const typeorm_2 = require("typeorm");
|
|
15
|
+
const instructor_entity_1 = require("./instructor.entity");
|
|
16
|
+
/**
|
|
17
|
+
* Instructor Shared Calendar State Entity
|
|
18
|
+
* - Represents the state of an instructor's shared calendar (busy/public)
|
|
19
|
+
* - Contains information about which appointments are active and which have been canceled
|
|
20
|
+
*/
|
|
21
|
+
let InstructorSharedCalendarStateEntity = class InstructorSharedCalendarStateEntity {
|
|
22
|
+
/************************* Methods *************************/
|
|
23
|
+
constructor(props) {
|
|
24
|
+
Object.assign(this, props);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.InstructorSharedCalendarStateEntity = InstructorSharedCalendarStateEntity;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], InstructorSharedCalendarStateEntity.prototype, "id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_2.CreateDateColumn)({ nullable: true, default: null }),
|
|
34
|
+
__metadata("design:type", Date)
|
|
35
|
+
], InstructorSharedCalendarStateEntity.prototype, "createdOn", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_2.UpdateDateColumn)({ nullable: true, default: null }),
|
|
38
|
+
__metadata("design:type", Date)
|
|
39
|
+
], InstructorSharedCalendarStateEntity.prototype, "updatedOn", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_2.DeleteDateColumn)({ nullable: true, default: null }),
|
|
42
|
+
__metadata("design:type", Date)
|
|
43
|
+
], InstructorSharedCalendarStateEntity.prototype, "deletedOn", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)(),
|
|
46
|
+
(0, typeorm_1.Generated)('uuid'),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], InstructorSharedCalendarStateEntity.prototype, "uid", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
51
|
+
__metadata("design:type", Boolean)
|
|
52
|
+
], InstructorSharedCalendarStateEntity.prototype, "public", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({
|
|
55
|
+
nullable: false
|
|
56
|
+
}),
|
|
57
|
+
__metadata("design:type", Number)
|
|
58
|
+
], InstructorSharedCalendarStateEntity.prototype, "instructorId", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: 'json' }),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], InstructorSharedCalendarStateEntity.prototype, "activeUids", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({ type: 'json' }),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], InstructorSharedCalendarStateEntity.prototype, "canceledUids", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.ManyToOne)(() => instructor_entity_1.CompanyInstructorEntity, instructor => instructor.sharedCalendarStates),
|
|
69
|
+
__metadata("design:type", Promise)
|
|
70
|
+
], InstructorSharedCalendarStateEntity.prototype, "instructor", void 0);
|
|
71
|
+
exports.InstructorSharedCalendarStateEntity = InstructorSharedCalendarStateEntity = __decorate([
|
|
72
|
+
(0, typeorm_1.Entity)('instructorSharedCalendarStates'),
|
|
73
|
+
__metadata("design:paramtypes", [Object])
|
|
74
|
+
], InstructorSharedCalendarStateEntity);
|
|
75
|
+
//# sourceMappingURL=calendar-state.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-state.entity.js","sourceRoot":"","sources":["../../../../src/profile/company/instructor/calendar-state.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAwF;AACxF,qCAA+E;AAC/E,2DAA8D;AAE9D;;;;GAIG;AAEI,IAAM,mCAAmC,GAAzC,MAAM,mCAAmC;IA2E/C,6DAA6D;IAE7D,YAAY,KAAoD;QAC/D,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD,CAAA;AAhFY,kFAAmC;AAK/C;IADC,IAAA,gCAAsB,GAAE;;+DACd;AAOX;IADC,IAAA,0BAAgB,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BACzC,IAAI;sEAAC;AAOhB;IADC,IAAA,0BAAgB,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BACzC,IAAI;sEAAC;AAOhB;IADC,IAAA,0BAAgB,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BACzC,IAAI;sEAAC;AAShB;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,mBAAS,EAAC,MAAM,CAAC;;gEACN;AAQZ;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;mEACZ;AAUhB;IAHC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,KAAK;KACf,CAAC;;yEACmB;AAOrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uEAC0C;AAQnE;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yEACgE;AAKzF;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,2CAAuB,EAAE,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,oBAAoB,CAAC;;uEAC3C;8CAzEjC,mCAAmC;IAD/C,IAAA,gBAAM,EAAC,gCAAgC,CAAC;;GAC5B,mCAAmC,CAgF/C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AccountStatus,
|
|
2
|
-
import { WorkingHours, Holiday, Preference
|
|
1
|
+
import { AccountStatus, Language, Role } from '@driveup/shared';
|
|
2
|
+
import { Activity, Instructor, Link, Metadata, WorkingHours, Holiday, Preference } from '@driveup/common';
|
|
3
3
|
import { CompanyEntity } from '../company.entity';
|
|
4
4
|
import { CompanyInstructorTaskEntity } from './task.entity';
|
|
5
5
|
import { InstructorEntity } from '../../instructor/instructor.entity';
|
|
@@ -8,14 +8,17 @@ import { CompanyCourseEntity } from '../course/course.entity';
|
|
|
8
8
|
import { CompanyCourseLessonEntity } from '../course/lesson.entity';
|
|
9
9
|
import { StudentTrainingEntity } from '../../student/program/training/training.entity';
|
|
10
10
|
import { StudentTrainingAppointmentEntity } from '../../student/program/training/appointment.entity';
|
|
11
|
-
import {
|
|
11
|
+
import { CompanyCourseScheduleEntity } from '../course/appointment.entity';
|
|
12
12
|
import { StudentTrainingLessonEntity } from '../../student/program/training/lesson.entity';
|
|
13
13
|
import { TrackableEntity } from '../../../utils/trackable';
|
|
14
|
+
import { CompanyInstructorActivityEntity } from './activity.entity';
|
|
15
|
+
import { InstructorSharedCalendarStateEntity } from './calendar-state.entity';
|
|
16
|
+
import { UserEntity } from '../../../user/user.entity';
|
|
14
17
|
export declare class CompanyInstructorEntity extends TrackableEntity<Instructor> {
|
|
15
18
|
instructorId: number;
|
|
16
19
|
companyId: number;
|
|
17
20
|
status: AccountStatus;
|
|
18
|
-
role:
|
|
21
|
+
role: Role;
|
|
19
22
|
/**
|
|
20
23
|
* Preferred language for the instructor interface
|
|
21
24
|
* Currently in sync with UserEntity.language not offered separately
|
|
@@ -36,6 +39,8 @@ export declare class CompanyInstructorEntity extends TrackableEntity<Instructor>
|
|
|
36
39
|
* Notification preferences stored as JSON
|
|
37
40
|
*/
|
|
38
41
|
preferences: Preference[];
|
|
42
|
+
metadata: Metadata[];
|
|
43
|
+
calendarLinks: Link[];
|
|
39
44
|
startedOn: Date;
|
|
40
45
|
invitedBy: number;
|
|
41
46
|
invitedOn: Date;
|
|
@@ -58,9 +63,9 @@ export declare class CompanyInstructorEntity extends TrackableEntity<Instructor>
|
|
|
58
63
|
*/
|
|
59
64
|
companyCourseLessons: Promise<CompanyCourseLessonEntity[]>;
|
|
60
65
|
/**
|
|
61
|
-
* Company course appointments assigned to this instructor (in-charge)
|
|
66
|
+
* Company course schedule appointments assigned to this instructor (in-charge)
|
|
62
67
|
*/
|
|
63
|
-
|
|
68
|
+
companyCourseSchedule: Promise<CompanyCourseScheduleEntity[]>;
|
|
64
69
|
/**
|
|
65
70
|
* Tasks assigned to the instructors
|
|
66
71
|
*/
|
|
@@ -81,37 +86,39 @@ export declare class CompanyInstructorEntity extends TrackableEntity<Instructor>
|
|
|
81
86
|
* Tasks assigned to the instructors
|
|
82
87
|
*/
|
|
83
88
|
tasks: Promise<CompanyInstructorTaskEntity[]>;
|
|
89
|
+
/**
|
|
90
|
+
* History of the profile activities (profile events)
|
|
91
|
+
*/
|
|
92
|
+
activities: Promise<CompanyInstructorActivityEntity[]>;
|
|
93
|
+
/**
|
|
94
|
+
* Shared calendar states for the instructor
|
|
95
|
+
*/
|
|
96
|
+
sharedCalendarStates: Promise<InstructorSharedCalendarStateEntity[]>;
|
|
84
97
|
constructor(props?: Partial<CompanyInstructorEntity>);
|
|
85
98
|
toModel(): Promise<Instructor>;
|
|
86
99
|
toSummary(): Promise<Instructor>;
|
|
87
100
|
toPerson(): Promise<import("@driveup/common").Person>;
|
|
101
|
+
getUser(): Promise<UserEntity>;
|
|
88
102
|
getInstructor(): Promise<InstructorEntity>;
|
|
89
103
|
canReinstate(): Promise<boolean>;
|
|
90
104
|
getActivities(): Promise<Activity[]>;
|
|
105
|
+
getInvitedBy(): Promise<CompanyInstructorEntity | null>;
|
|
91
106
|
/**
|
|
92
107
|
* Log instructor event
|
|
93
108
|
* @param event Event type
|
|
94
109
|
* @param metadata Content render data (in instructor language)
|
|
95
|
-
* @param entityId Optional related entity ID
|
|
96
110
|
*/
|
|
97
|
-
log(event: string, metadata?: any
|
|
111
|
+
log(event: string, metadata?: any): Promise<void>;
|
|
98
112
|
/**
|
|
99
113
|
* Log event from authoring perspective.
|
|
100
114
|
* Author logs are used to capture actions taken by the instructor themselves
|
|
101
115
|
* @param event Event type
|
|
102
116
|
* @param metadata Content render data (in instructor language)
|
|
103
|
-
* @param entityId Optional related entity ID
|
|
104
117
|
*/
|
|
105
|
-
logAsAuthor(event: string, metadata?: any
|
|
118
|
+
logAsAuthor(event: string, metadata?: any): Promise<void>;
|
|
106
119
|
/**
|
|
107
120
|
* Retrieves notification preferences as typed Preference instances
|
|
108
121
|
* @returns Array of Preference objects or undefined if not set
|
|
109
122
|
*/
|
|
110
123
|
getPreferences(): Preference<boolean>[];
|
|
111
|
-
/**
|
|
112
|
-
* Checks if notifications are enabled for a specific event
|
|
113
|
-
* @param event Event name to check
|
|
114
|
-
* @returns True if notifications are enabled, false otherwise
|
|
115
|
-
*/
|
|
116
|
-
isNotificationEnabled(event: string): boolean;
|
|
117
124
|
}
|