@driveup/schema 0.2.5 → 0.2.7
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 +3 -3
- package/lib/catalog/addon/addon.entity.js +5 -5
- package/lib/catalog/addon/addon.entity.js.map +1 -1
- package/lib/catalog/addon/country.entity.d.ts +3 -3
- package/lib/catalog/addon/country.entity.js +5 -5
- package/lib/catalog/addon/country.entity.js.map +1 -1
- package/lib/catalog/priceplan/priceplan.entity.d.ts +2 -2
- package/lib/catalog/priceplan/priceplan.entity.js +4 -4
- package/lib/catalog/priceplan/priceplan.entity.js.map +1 -1
- package/lib/catalog/product/country.entity.d.ts +4 -4
- package/lib/catalog/product/country.entity.js +9 -9
- package/lib/catalog/product/country.entity.js.map +1 -1
- package/lib/catalog/product/priceplan.entity.d.ts +3 -3
- package/lib/catalog/product/priceplan.entity.js +8 -8
- package/lib/catalog/product/priceplan.entity.js.map +1 -1
- package/lib/catalog/product/product.entity.d.ts +3 -3
- package/lib/catalog/product/product.entity.js +6 -6
- package/lib/catalog/product/product.entity.js.map +1 -1
- package/lib/catalog/program/program.entity.d.ts +1 -1
- package/lib/catalog/program/program.entity.js +5 -5
- package/lib/catalog/program/program.entity.js.map +1 -1
- package/lib/catalog/seed/assets/asset.entity.d.ts +2 -2
- package/lib/catalog/seed/assets/asset.entity.js +4 -4
- package/lib/catalog/seed/assets/asset.entity.js.map +1 -1
- package/lib/catalog/seed/courses/course.entity.d.ts +3 -3
- package/lib/catalog/seed/courses/course.entity.js +7 -7
- 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 +5 -5
- 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 +5 -5
- package/lib/catalog/seed/courses/topic.entity.js.map +1 -1
- package/lib/catalog/seed/expense/category.entity.d.ts +1 -1
- package/lib/catalog/seed/expense/category.entity.js +4 -4
- package/lib/catalog/seed/expense/category.entity.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/profile/agent/agent.entity.d.ts +12 -4
- package/lib/profile/agent/agent.entity.js +30 -6
- package/lib/profile/agent/agent.entity.js.map +1 -1
- package/lib/profile/agent/asset.entity.d.ts +1 -1
- package/lib/profile/agent/asset.entity.js +2 -2
- package/lib/profile/agent/asset.entity.js.map +1 -1
- package/lib/profile/agent/payout.entity.d.ts +2 -2
- package/lib/profile/agent/payout.entity.js +4 -4
- package/lib/profile/agent/payout.entity.js.map +1 -1
- package/lib/profile/agent/promotion.entity.d.ts +3 -3
- package/lib/profile/agent/promotion.entity.js +6 -6
- package/lib/profile/agent/promotion.entity.js.map +1 -1
- package/lib/profile/company/company.entity.d.ts +39 -8
- package/lib/profile/company/company.entity.js +147 -10
- package/lib/profile/company/company.entity.js.map +1 -1
- package/lib/profile/company/course/course.entity.d.ts +35 -8
- package/lib/profile/company/course/course.entity.js +48 -9
- package/lib/profile/company/course/course.entity.js.map +1 -1
- package/lib/profile/company/course/lesson.entity.d.ts +20 -6
- package/lib/profile/company/course/lesson.entity.js +77 -10
- package/lib/profile/company/course/lesson.entity.js.map +1 -1
- package/lib/profile/company/course/{appointment.entity.d.ts → schedule.entity.d.ts} +78 -8
- package/lib/profile/company/course/{appointment.entity.js → schedule.entity.js} +257 -7
- package/lib/profile/company/course/schedule.entity.js.map +1 -0
- package/lib/profile/company/course/topic.entity.d.ts +6 -2
- package/lib/profile/company/course/topic.entity.js +12 -5
- package/lib/profile/company/course/topic.entity.js.map +1 -1
- package/lib/profile/company/finances/billing/bill.entity.d.ts +3 -3
- package/lib/profile/company/finances/billing/bill.entity.js +5 -5
- 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 +5 -5
- package/lib/profile/company/finances/billing/item.entity.js.map +1 -1
- package/lib/profile/company/finances/billing/transaction.entity.d.ts +3 -3
- package/lib/profile/company/finances/billing/transaction.entity.js +6 -6
- package/lib/profile/company/finances/billing/transaction.entity.js.map +1 -1
- package/lib/profile/company/finances/expense/category.entity.d.ts +1 -1
- package/lib/profile/company/finances/expense/category.entity.js +4 -4
- package/lib/profile/company/finances/expense/category.entity.js.map +1 -1
- package/lib/profile/company/finances/expense/expense.entity.d.ts +6 -2
- package/lib/profile/company/finances/expense/expense.entity.js +32 -4
- package/lib/profile/company/finances/expense/expense.entity.js.map +1 -1
- package/lib/profile/company/finances/handover/handover.entity.d.ts +3 -3
- package/lib/profile/company/finances/handover/handover.entity.js +6 -6
- package/lib/profile/company/finances/handover/handover.entity.js.map +1 -1
- package/lib/profile/company/finances/invoice/invoice.entity.d.ts +7 -6
- package/lib/profile/company/finances/invoice/invoice.entity.js +9 -8
- package/lib/profile/company/finances/invoice/invoice.entity.js.map +1 -1
- package/lib/profile/company/finances/invoice/item.entity.d.ts +2 -2
- package/lib/profile/company/finances/invoice/item.entity.js +4 -4
- package/lib/profile/company/finances/invoice/item.entity.js.map +1 -1
- package/lib/profile/company/finances/payment/method.entity.d.ts +10 -4
- package/lib/profile/company/finances/payment/method.entity.js +24 -5
- package/lib/profile/company/finances/payment/method.entity.js.map +1 -1
- package/lib/profile/company/instructor/activity.entity.js.map +1 -1
- package/lib/profile/company/instructor/calendar-state.entity.js.map +1 -1
- package/lib/profile/company/instructor/instructor.entity.d.ts +20 -11
- package/lib/profile/company/instructor/instructor.entity.js +111 -16
- package/lib/profile/company/instructor/instructor.entity.js.map +1 -1
- package/lib/profile/company/instructor/task.entity.d.ts +2 -1
- package/lib/profile/company/instructor/task.entity.js +9 -4
- package/lib/profile/company/instructor/task.entity.js.map +1 -1
- package/lib/profile/company/medical/examination.entity.d.ts +3 -3
- package/lib/profile/company/medical/examination.entity.js +5 -5
- package/lib/profile/company/medical/examination.entity.js.map +1 -1
- package/lib/profile/company/medical/product.entity.d.ts +4 -4
- package/lib/profile/company/medical/product.entity.js +5 -5
- package/lib/profile/company/medical/product.entity.js.map +1 -1
- package/lib/profile/company/product/addon.entity.d.ts +2 -2
- package/lib/profile/company/product/addon.entity.js +5 -5
- package/lib/profile/company/product/addon.entity.js.map +1 -1
- package/lib/profile/company/product/priceplan.entity.d.ts +4 -3
- package/lib/profile/company/product/priceplan.entity.js +9 -4
- package/lib/profile/company/product/priceplan.entity.js.map +1 -1
- package/lib/profile/company/product/product.entity.d.ts +8 -7
- package/lib/profile/company/product/product.entity.js +19 -9
- package/lib/profile/company/product/product.entity.js.map +1 -1
- package/lib/profile/company/product/vehicle.entity.d.ts +2 -2
- package/lib/profile/company/product/vehicle.entity.js +4 -4
- package/lib/profile/company/product/vehicle.entity.js.map +1 -1
- package/lib/profile/instructor/instructor.entity.d.ts +6 -3
- package/lib/profile/instructor/instructor.entity.js +28 -7
- package/lib/profile/instructor/instructor.entity.js.map +1 -1
- package/lib/profile/student/program/licence/licence.entity.d.ts +3 -3
- package/lib/profile/student/program/licence/licence.entity.js +5 -5
- package/lib/profile/student/program/licence/licence.entity.js.map +1 -1
- package/lib/profile/student/program/medical/certificate.entity.d.ts +2 -2
- package/lib/profile/student/program/medical/certificate.entity.js +4 -4
- package/lib/profile/student/program/medical/certificate.entity.js.map +1 -1
- package/lib/profile/student/program/medical/examination.entity.d.ts +3 -3
- package/lib/profile/student/program/medical/examination.entity.js +10 -10
- package/lib/profile/student/program/medical/examination.entity.js.map +1 -1
- package/lib/profile/student/program/program.entity.d.ts +11 -6
- package/lib/profile/student/program/program.entity.js +14 -9
- package/lib/profile/student/program/program.entity.js.map +1 -1
- package/lib/profile/student/program/training/appointment.entity.d.ts +23 -9
- package/lib/profile/student/program/training/appointment.entity.js +115 -13
- package/lib/profile/student/program/training/appointment.entity.js.map +1 -1
- package/lib/profile/student/program/training/exam.entity.d.ts +4 -2
- package/lib/profile/student/program/training/exam.entity.js +12 -4
- package/lib/profile/student/program/training/exam.entity.js.map +1 -1
- package/lib/profile/student/program/training/lesson.entity.d.ts +10 -4
- package/lib/profile/student/program/training/lesson.entity.js +32 -7
- package/lib/profile/student/program/training/lesson.entity.js.map +1 -1
- package/lib/profile/student/program/training/request.entity.d.ts +6 -3
- package/lib/profile/student/program/training/request.entity.js +26 -5
- package/lib/profile/student/program/training/request.entity.js.map +1 -1
- package/lib/profile/student/program/training/topic.entity.d.ts +14 -3
- package/lib/profile/student/program/training/topic.entity.js +29 -5
- package/lib/profile/student/program/training/topic.entity.js.map +1 -1
- package/lib/profile/student/program/training/training.entity.d.ts +76 -8
- package/lib/profile/student/program/training/training.entity.js +226 -9
- package/lib/profile/student/program/training/training.entity.js.map +1 -1
- package/lib/profile/student/program/training/transaction.entity.d.ts +8 -3
- package/lib/profile/student/program/training/transaction.entity.js +41 -4
- package/lib/profile/student/program/training/transaction.entity.js.map +1 -1
- package/lib/profile/student/student.entity.d.ts +11 -6
- package/lib/profile/student/student.entity.js +57 -10
- 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 +6 -6
- package/lib/system/campaign/campaign.entity.js.map +1 -1
- package/lib/system/campaign/gifcode.entity.d.ts +2 -2
- package/lib/system/campaign/gifcode.entity.js +6 -6
- package/lib/system/campaign/gifcode.entity.js.map +1 -1
- package/lib/system/country/country.entity.d.ts +7 -5
- package/lib/system/country/country.entity.js +15 -9
- package/lib/system/country/country.entity.js.map +1 -1
- package/lib/system/currency/currency.entity.d.ts +1 -1
- package/lib/system/currency/currency.entity.js +4 -4
- package/lib/system/currency/currency.entity.js.map +1 -1
- package/lib/system/driving/category.entity.d.ts +7 -7
- package/lib/system/driving/category.entity.js +12 -12
- package/lib/system/driving/category.entity.js.map +1 -1
- package/lib/system/driving/vehicle.entity.d.ts +2 -2
- package/lib/system/driving/vehicle.entity.js +4 -4
- package/lib/system/driving/vehicle.entity.js.map +1 -1
- package/lib/system/event/event.entity.d.ts +2 -2
- package/lib/system/event/event.entity.js +4 -4
- package/lib/system/event/event.entity.js.map +1 -1
- package/lib/system/event/log.entity.d.ts +2 -2
- package/lib/system/event/log.entity.js +3 -3
- package/lib/system/event/log.entity.js.map +1 -1
- package/lib/system/policy/policy.entity.d.ts +1 -1
- package/lib/system/policy/policy.entity.js +5 -5
- package/lib/system/policy/policy.entity.js.map +1 -1
- package/lib/system/staff/staff.entity.d.ts +1 -1
- package/lib/system/staff/staff.entity.js +3 -3
- package/lib/system/staff/staff.entity.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/user/alert.entity.d.ts +3 -2
- package/lib/user/alert.entity.js +11 -4
- package/lib/user/alert.entity.js.map +1 -1
- package/lib/user/blocked.entity.js +2 -2
- package/lib/user/blocked.entity.js.map +1 -1
- package/lib/user/device.entity.d.ts +15 -0
- package/lib/user/device.entity.js +26 -0
- package/lib/user/device.entity.js.map +1 -1
- package/lib/user/notification.entity.d.ts +2 -2
- package/lib/user/notification.entity.js +4 -4
- package/lib/user/notification.entity.js.map +1 -1
- package/lib/user/ticket.entity.d.ts +8 -3
- package/lib/user/ticket.entity.js +11 -4
- package/lib/user/ticket.entity.js.map +1 -1
- package/lib/user/user.entity.d.ts +91 -82
- package/lib/user/user.entity.js +257 -259
- package/lib/user/user.entity.js.map +1 -1
- package/lib/user/verification.entity.js +2 -2
- package/lib/user/verification.entity.js.map +1 -1
- package/lib/utils/activity.helper.d.ts +2 -2
- package/lib/utils/activity.helper.js.map +1 -1
- package/lib/utils/trackable.d.ts +2 -2
- package/lib/utils/trackable.js.map +1 -1
- package/package.json +2 -2
- package/lib/profile/company/course/appointment.entity.js.map +0 -1
|
@@ -11,13 +11,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var StudentTrainingTransactionEntity_1;
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.StudentTrainingTransactionEntity = void 0;
|
|
14
|
-
const typeorm_1 = require("typeorm");
|
|
15
|
-
const shared_1 = require("@driveup/shared");
|
|
16
14
|
const common_1 = require("@driveup/common");
|
|
15
|
+
const shared_1 = require("@driveup/shared");
|
|
16
|
+
const typeorm_1 = require("typeorm");
|
|
17
|
+
const activity_helper_1 = require("../../../../utils/activity.helper");
|
|
18
|
+
const trackable_1 = require("../../../../utils/trackable");
|
|
17
19
|
const invoice_entity_1 = require("../../../company/finances/invoice/invoice.entity");
|
|
20
|
+
const instructor_entity_1 = require("../../../company/instructor/instructor.entity");
|
|
18
21
|
const training_entity_1 = require("./training.entity");
|
|
19
|
-
const trackable_1 = require("../../../../utils/trackable");
|
|
20
|
-
const activity_helper_1 = require("../../../../utils/activity.helper");
|
|
21
22
|
/**
|
|
22
23
|
* Student training transaction entity representing financial transactions for training sessions.
|
|
23
24
|
* Handles payments, cancellations, and refunds related to student training programs.
|
|
@@ -54,6 +55,9 @@ let StudentTrainingTransactionEntity = StudentTrainingTransactionEntity_1 = clas
|
|
|
54
55
|
toSummary() {
|
|
55
56
|
return this.toModel();
|
|
56
57
|
}
|
|
58
|
+
async getTraining() {
|
|
59
|
+
return await this.training;
|
|
60
|
+
}
|
|
57
61
|
/**
|
|
58
62
|
* Retrieves the referenced transaction (typically a cancellation transaction)
|
|
59
63
|
* @returns The related transaction entity or undefined if no reference exists
|
|
@@ -75,6 +79,39 @@ let StudentTrainingTransactionEntity = StudentTrainingTransactionEntity_1 = clas
|
|
|
75
79
|
refTransactionId: this.id
|
|
76
80
|
});
|
|
77
81
|
}
|
|
82
|
+
async getRegisteredBy() {
|
|
83
|
+
if (!this.createdBy)
|
|
84
|
+
return null;
|
|
85
|
+
const training = await this.training;
|
|
86
|
+
const company = await training.getCompany();
|
|
87
|
+
return await instructor_entity_1.CompanyInstructorEntity.createQueryBuilder('ci')
|
|
88
|
+
.innerJoin('ci.instructor', 'i') // instructor profile
|
|
89
|
+
.where('i.userId = :userId', { userId: this.createdBy })
|
|
90
|
+
.andWhere('ci.companyId = :companyId', { companyId: company.id })
|
|
91
|
+
.getOne();
|
|
92
|
+
}
|
|
93
|
+
async getApprovedBy() {
|
|
94
|
+
if (!this.approvedBy)
|
|
95
|
+
return null;
|
|
96
|
+
const training = await this.training;
|
|
97
|
+
const company = await training.getCompany();
|
|
98
|
+
return await instructor_entity_1.CompanyInstructorEntity.createQueryBuilder('ci')
|
|
99
|
+
.innerJoin('ci.instructor', 'i') // instructor profile
|
|
100
|
+
.where('i.userId = :userId', { userId: this.approvedBy })
|
|
101
|
+
.andWhere('ci.companyId = :companyId', { companyId: company.id })
|
|
102
|
+
.getOne();
|
|
103
|
+
}
|
|
104
|
+
async getCanceledBy() {
|
|
105
|
+
if (!this.canceledBy)
|
|
106
|
+
return null;
|
|
107
|
+
const training = await this.training;
|
|
108
|
+
const company = await training.getCompany();
|
|
109
|
+
return await instructor_entity_1.CompanyInstructorEntity.createQueryBuilder('ci')
|
|
110
|
+
.innerJoin('ci.instructor', 'i') // instructor profile
|
|
111
|
+
.where('i.userId = :userId', { userId: this.canceledBy })
|
|
112
|
+
.andWhere('ci.companyId = :companyId', { companyId: company.id })
|
|
113
|
+
.getOne();
|
|
114
|
+
}
|
|
78
115
|
/**
|
|
79
116
|
* Retrieves all tracked activities for this transaction
|
|
80
117
|
* Includes creation and update timestamps and associated users
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.entity.js","sourceRoot":"","sources":["../../../../../src/profile/student/program/training/transaction.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"transaction.entity.js","sourceRoot":"","sources":["../../../../../src/profile/student/program/training/transaction.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,4CAAqE;AACrE,4CAAyF;AACzF,qCAA0E;AAE1E,uEAA+D;AAC/D,2DAA8D;AAC9D,qFAAwF;AACxF,qFAAwF;AACxF,uDAA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,GAAG,EAAE,CAAC,uCAAqB,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC;;kEACjC;AAOzC;IAFC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,qCAAoB,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;IACjE,IAAA,oBAAU,GAAE;;iEAC0B;2CA5I3B,gCAAgC;IAD5C,IAAA,gBAAM,EAAC,6BAA6B,CAAC;;GACzB,gCAAgC,CAoP5C"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Activity, Person, Preference, Student } from '@driveup/common';
|
|
2
|
+
import { AccountStatus, Language, PreferenceScope, ProductType, ProgramType } from '@driveup/shared';
|
|
3
3
|
import { UserEntity } from '../../user/user.entity';
|
|
4
|
+
import { TrackableEntity } from '../../utils/trackable';
|
|
5
|
+
import { CompanyEntity } from '../company/company.entity';
|
|
4
6
|
import { StudentLicenceEntity } from './program/licence/licence.entity';
|
|
7
|
+
import { StudentMedicalCertificateEntity } from './program/medical/certificate.entity';
|
|
5
8
|
import { StudentMedicalExaminationEntity } from './program/medical/examination.entity';
|
|
6
9
|
import { StudentProgramEntity } from './program/program.entity';
|
|
7
|
-
import { StudentMedicalCertificateEntity } from './program/medical/certificate.entity';
|
|
8
|
-
import { TrackableEntity } from '../../utils/trackable';
|
|
9
|
-
import { CompanyEntity } from '../company/company.entity';
|
|
10
10
|
export declare class StudentEntity extends TrackableEntity<Student> {
|
|
11
11
|
/**
|
|
12
12
|
* Reference to the user account associated with this student profile
|
|
@@ -63,7 +63,7 @@ export declare class StudentEntity extends TrackableEntity<Student> {
|
|
|
63
63
|
/**
|
|
64
64
|
* All programs linked to this student profile
|
|
65
65
|
* The programs are created when the student enrolls to a driving category
|
|
66
|
-
* The program is palette of trainings and
|
|
66
|
+
* The program is palette of trainings and preparation trainings
|
|
67
67
|
*/
|
|
68
68
|
programs: Promise<StudentProgramEntity[]>;
|
|
69
69
|
/**
|
|
@@ -82,6 +82,9 @@ export declare class StudentEntity extends TrackableEntity<Student> {
|
|
|
82
82
|
* @returns Promise resolving to Student model
|
|
83
83
|
*/
|
|
84
84
|
toSummary(): Promise<Student>;
|
|
85
|
+
toPerson(): Promise<Person>;
|
|
86
|
+
getUser(): Promise<UserEntity>;
|
|
87
|
+
getProgram(programType: ProgramType, productTypes: ProductType[], categoryId?: number): Promise<StudentProgramEntity>;
|
|
85
88
|
/**
|
|
86
89
|
* Calculates the total balance for this student across all trainings under a specific company (transactions are filtered by type === training)
|
|
87
90
|
* @param company CompanyEntity - The company to filter trainings by
|
|
@@ -118,4 +121,6 @@ export declare class StudentEntity extends TrackableEntity<Student> {
|
|
|
118
121
|
* @returns Array of Preference objects or undefined if not set
|
|
119
122
|
*/
|
|
120
123
|
getPreferences(): Preference<boolean>[];
|
|
124
|
+
setPreference(name: string, value: any, scope: PreferenceScope): Promise<Preference<boolean>[]>;
|
|
125
|
+
removePreference(name: string): Promise<Preference<boolean>[]>;
|
|
121
126
|
}
|
|
@@ -8,22 +8,23 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var StudentEntity_1;
|
|
11
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
13
|
exports.StudentEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const shared_1 = require("@driveup/shared");
|
|
15
14
|
const common_1 = require("@driveup/common");
|
|
16
|
-
const
|
|
15
|
+
const shared_1 = require("@driveup/shared");
|
|
16
|
+
const typeorm_1 = require("typeorm");
|
|
17
17
|
const log_entity_1 = require("../../system/event/log.entity");
|
|
18
|
+
const user_entity_1 = require("../../user/user.entity");
|
|
19
|
+
const activity_helper_1 = require("../../utils/activity.helper");
|
|
20
|
+
const trackable_1 = require("../../utils/trackable");
|
|
18
21
|
const licence_entity_1 = require("./program/licence/licence.entity");
|
|
22
|
+
const certificate_entity_1 = require("./program/medical/certificate.entity");
|
|
19
23
|
const examination_entity_1 = require("./program/medical/examination.entity");
|
|
20
24
|
const program_entity_1 = require("./program/program.entity");
|
|
21
|
-
const certificate_entity_1 = require("./program/medical/certificate.entity");
|
|
22
|
-
const trackable_1 = require("../../utils/trackable");
|
|
23
|
-
const activity_helper_1 = require("../../utils/activity.helper");
|
|
24
|
-
const transaction_entity_1 = require("./program/training/transaction.entity");
|
|
25
25
|
const training_entity_1 = require("./program/training/training.entity");
|
|
26
|
-
|
|
26
|
+
const transaction_entity_1 = require("./program/training/transaction.entity");
|
|
27
|
+
let StudentEntity = StudentEntity_1 = class StudentEntity extends trackable_1.TrackableEntity {
|
|
27
28
|
/**
|
|
28
29
|
* Creates an instance of StudentEntity
|
|
29
30
|
* @param props - Partial properties to initialize the entity
|
|
@@ -54,6 +55,33 @@ let StudentEntity = class StudentEntity extends trackable_1.TrackableEntity {
|
|
|
54
55
|
async toSummary() {
|
|
55
56
|
return await this.toModel();
|
|
56
57
|
}
|
|
58
|
+
async toPerson() {
|
|
59
|
+
const user = await this.user;
|
|
60
|
+
return new common_1.Person({
|
|
61
|
+
id: this.id,
|
|
62
|
+
name: this.name || user.name,
|
|
63
|
+
email: user.email,
|
|
64
|
+
phone: user.phone,
|
|
65
|
+
imageUrl: user.imageUrl
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
async getUser() {
|
|
69
|
+
return await this.user;
|
|
70
|
+
}
|
|
71
|
+
async getProgram(programType, productTypes, categoryId) {
|
|
72
|
+
return await program_entity_1.StudentProgramEntity
|
|
73
|
+
.createQueryBuilder('sp')
|
|
74
|
+
.innerJoin('sp.program', 'p')
|
|
75
|
+
.where('sp.studentId = :studentId', { studentId: this.id })
|
|
76
|
+
.andWhere('sp.status = :progressStatus', { progressStatus: shared_1.StatusType.Progress })
|
|
77
|
+
.andWhere('p.type = :programType', { programType: programType })
|
|
78
|
+
.andWhere('(:...products) in p.products', { products: productTypes })
|
|
79
|
+
.andWhere(new typeorm_1.Brackets(qb => {
|
|
80
|
+
qb.where('(p.categoryId is null and :categoryId is null)', { categoryId: categoryId })
|
|
81
|
+
.orWhere('p.categoryId = :categoryId', { categoryId: categoryId });
|
|
82
|
+
}))
|
|
83
|
+
.getOne();
|
|
84
|
+
}
|
|
57
85
|
/**
|
|
58
86
|
* Calculates the total balance for this student across all trainings under a specific company (transactions are filtered by type === training)
|
|
59
87
|
* @param company CompanyEntity - The company to filter trainings by
|
|
@@ -84,7 +112,9 @@ let StudentEntity = class StudentEntity extends trackable_1.TrackableEntity {
|
|
|
84
112
|
.where('cp.companyId = :companyId', { companyId: company.id })
|
|
85
113
|
.andWhere('sp.studentId = :studentId', { studentId: this.id })
|
|
86
114
|
.andWhere('tr.type = :paymentType', { paymentType: shared_1.TransactionType.Payment })
|
|
87
|
-
.
|
|
115
|
+
.andWhere('tr.status != :canceledStatus', { canceledStatus: shared_1.StatusType.Canceled })
|
|
116
|
+
.andWhere('tr.refTransactionId is null')
|
|
117
|
+
.select('SUM(COALESCE(tr.amount, 0))', 'total')
|
|
88
118
|
.getRawOne();
|
|
89
119
|
return Number(result?.total ?? 0);
|
|
90
120
|
}
|
|
@@ -141,6 +171,23 @@ let StudentEntity = class StudentEntity extends trackable_1.TrackableEntity {
|
|
|
141
171
|
return;
|
|
142
172
|
return this.preferences.map(common_1.Preference.toInstance);
|
|
143
173
|
}
|
|
174
|
+
async setPreference(name, value, scope) {
|
|
175
|
+
this.preferences = this.preferences || [];
|
|
176
|
+
this.preferences = this.preferences.filter(p => p.name !== name);
|
|
177
|
+
this.preferences.push(new common_1.Preference({
|
|
178
|
+
scope: scope,
|
|
179
|
+
name: name,
|
|
180
|
+
value: value
|
|
181
|
+
}));
|
|
182
|
+
await StudentEntity_1.save(this);
|
|
183
|
+
return this.preferences;
|
|
184
|
+
}
|
|
185
|
+
async removePreference(name) {
|
|
186
|
+
this.preferences = this.preferences || [];
|
|
187
|
+
this.preferences = this.preferences.filter(p => p.name !== name);
|
|
188
|
+
await StudentEntity_1.save(this);
|
|
189
|
+
return this.preferences;
|
|
190
|
+
}
|
|
144
191
|
};
|
|
145
192
|
exports.StudentEntity = StudentEntity;
|
|
146
193
|
__decorate([
|
|
@@ -197,7 +244,7 @@ __decorate([
|
|
|
197
244
|
(0, typeorm_1.OneToMany)(() => program_entity_1.StudentProgramEntity, program => program.student),
|
|
198
245
|
__metadata("design:type", Promise)
|
|
199
246
|
], StudentEntity.prototype, "programs", void 0);
|
|
200
|
-
exports.StudentEntity = StudentEntity = __decorate([
|
|
247
|
+
exports.StudentEntity = StudentEntity = StudentEntity_1 = __decorate([
|
|
201
248
|
(0, typeorm_1.Entity)('students'),
|
|
202
249
|
__metadata("design:paramtypes", [Object])
|
|
203
250
|
], StudentEntity);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"student.entity.js","sourceRoot":"","sources":["../../../src/profile/student/student.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"student.entity.js","sourceRoot":"","sources":["../../../src/profile/student/student.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,4CAAwE;AACxE,4CAAsK;AACtK,qCAAyE;AAEzE,8DAA0D;AAC1D,wDAAoD;AACpD,iEAAyD;AACzD,qDAAwD;AAExD,qEAAwE;AACxE,6EAAuF;AACvF,6EAAuF;AACvF,6DAAgE;AAChE,wEAA2E;AAC3E,8EAAyF;AAGlF,IAAM,aAAa,qBAAnB,MAAM,aAAc,SAAQ,2BAAwB;IA8F1D;;;OAGG;IACH,YAAY,KAA8B;QACzC,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,OAAO;QACZ,MAAM,IAAI,GAAG,MA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+B,EAAE,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;;0DACrB;AAShE;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAoB,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;;+CACxB;AAQ1C;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAoB,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;;+CACxB;wBA5F9B,aAAa;IADzB,IAAA,gBAAM,EAAC,UAAU,CAAC;;GACN,aAAa,CA8QzB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ProductType, Language } from '@driveup/shared';
|
|
2
1
|
import { Activity, Campaigne, Content } from '@driveup/common';
|
|
3
|
-
import {
|
|
2
|
+
import { Language, ProductType } from '@driveup/shared';
|
|
4
3
|
import { TrackableEntity } from '../../utils/trackable';
|
|
4
|
+
import { CampaignGiftCodeEntity } from './gifcode.entity';
|
|
5
5
|
/**
|
|
6
6
|
* Represents a marketing campaign in the system.
|
|
7
7
|
* Campaigns offer promotional discounts through gift codes that users can redeem.
|
|
@@ -10,14 +10,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CampaignEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const nestjs_i18n_1 = require("nestjs-i18n");
|
|
15
|
-
const shared_1 = require("@driveup/shared");
|
|
16
13
|
const common_1 = require("@driveup/common");
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
14
|
+
const shared_1 = require("@driveup/shared");
|
|
15
|
+
const nestjs_i18n_1 = require("nestjs-i18n");
|
|
16
|
+
const typeorm_1 = require("typeorm");
|
|
20
17
|
const activity_helper_1 = require("../../utils/activity.helper");
|
|
18
|
+
const trackable_1 = require("../../utils/trackable");
|
|
19
|
+
const staff_entity_1 = require("../staff/staff.entity");
|
|
20
|
+
const gifcode_entity_1 = require("./gifcode.entity");
|
|
21
21
|
/**
|
|
22
22
|
* Represents a marketing campaign in the system.
|
|
23
23
|
* Campaigns offer promotional discounts through gift codes that users can redeem.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"campaign.entity.js","sourceRoot":"","sources":["../../../src/system/campaign/campaign.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"campaign.entity.js","sourceRoot":"","sources":["../../../src/system/campaign/campaign.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA+D;AAC/D,4CAAsE;AACtE,6CAA0C;AAC1C,qCAAoD;AAEpD,iEAAyD;AACzD,qDAAwD;AACxD,wDAAoD;AACpD,qDAA0D;AAE1D;;;;;;;GAOG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,2BAA0B;IA6D7D;;;OAGG;IACH,YAAY,KAA+B;QAC1C,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACH,OAAO,CAAC,IAAe;QACtB,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC9C,OAAO,IAAI,kBAAS,CAAC;YACpB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,KAAK,EAAE,WAAW,CAAC,KAAK;YACxB,WAAW,EAAE,WAAW,CAAC,WAAW;YACpC,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,QAAQ,EAAE,WAAW,CAAC,GAAG,IAAI,IAAI,CAAC,QAAQ;YAC1C,UAAU,EAAE,IAAI,CAAC,UAAU;SAC3B,CAAC,CAAC;IACJ,CAAC;IAED,SAAS,CAAC,IAAe;QACxB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAED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';
|
|
2
1
|
import { Activity, GiftCode } from '@driveup/common';
|
|
3
|
-
import {
|
|
2
|
+
import { ProfileType } from '@driveup/shared';
|
|
4
3
|
import { TrackableEntity } from '../../utils/trackable';
|
|
4
|
+
import { CampaignEntity } from './campaign.entity';
|
|
5
5
|
/**
|
|
6
6
|
* Campaign gift code entity representing promotional codes for campaigns.
|
|
7
7
|
* Extends TrackableEntity to track creation and update information.
|
|
@@ -10,13 +10,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CampaignGiftCodeEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const shared_1 = require("@driveup/shared");
|
|
15
13
|
const common_1 = require("@driveup/common");
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const trackable_1 = require("../../utils/trackable");
|
|
14
|
+
const shared_1 = require("@driveup/shared");
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
19
16
|
const activity_helper_1 = require("../../utils/activity.helper");
|
|
17
|
+
const trackable_1 = require("../../utils/trackable");
|
|
18
|
+
const staff_entity_1 = require("../staff/staff.entity");
|
|
19
|
+
const campaign_entity_1 = require("./campaign.entity");
|
|
20
20
|
/**
|
|
21
21
|
* Campaign gift code entity representing promotional codes for campaigns.
|
|
22
22
|
* Extends TrackableEntity to track creation and update information.
|
|
@@ -56,7 +56,7 @@ let CampaignGiftCodeEntity = class CampaignGiftCodeEntity extends trackable_1.Tr
|
|
|
56
56
|
async getActivities() {
|
|
57
57
|
const activities = [];
|
|
58
58
|
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy, this.createdOn, shared_1.ActivityType.created, staff_entity_1.StaffEntity));
|
|
59
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.registredBy, this.registredOn, shared_1.ActivityType.
|
|
59
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.registredBy, this.registredOn, shared_1.ActivityType.registered));
|
|
60
60
|
return activities;
|
|
61
61
|
}
|
|
62
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gifcode.entity.js","sourceRoot":"","sources":["../../../src/system/campaign/gifcode.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"gifcode.entity.js","sourceRoot":"","sources":["../../../src/system/campaign/gifcode.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAqD;AACrD,4CAA4D;AAC5D,qCAAoD;AAEpD,iEAAyD;AACzD,qDAAwD;AACxD,wDAAoD;AACpD,uDAAmD;AAEnD;;;GAGG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,2BAAyB;IA+CpE;;;OAGG;IACH,YAAY,KAAuC;QAClD,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACH,OAAO;QACN,OAAO,IAAI,iBAAQ,CAAC;YACnB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;SACrB,CAAC,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,SAAS;QACR,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa;QAClB,MAAM,UAAU,GAAe,EAAE,CAAC;QAClC,UAAU,CAAC,IAAI,CAAC,MAAM,IAAA,4BAAU,EAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,qBAAY,CAAC,OAAO,EAAE,0BAAW,CAAC,CAAC,CAAC;QACrG,UAAU,CAAC,IAAI,CAAC,MAAM,IAAA,4BAAU,EAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,qBAAY,CAAC,UAAU,CAAC,CAAC,CAAC;QAC/F,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAA;AAvFY,wDAAsB;AAMlC;IADC,IAAA,gBAAM,GAAE;;0DACU;AAUnB;IALC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,CAAC;KACT,CAAC;;oDACW;AAWb;IANC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,oBAAW;QACjB,OAAO,EAAE,oBAAW,CAAC,OAAO;QAC5B,QAAQ,EAAE,IAAI;KACd,CAAC;;uDACmB;AAMrB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;2DACtB;AAMpB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BAC7B,IAAI;2DAAC;AAMlB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,gCAAc,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC;;wDAC9B;iCA7CtB,sBAAsB;IADlC,IAAA,gBAAM,EAAC,yBAAyB,CAAC;;GACrB,sBAAsB,CAuFlC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { Activity, Country, Holiday, WorkingHours } from '@driveup/common';
|
|
1
2
|
import { Language } from '@driveup/shared';
|
|
2
|
-
import {
|
|
3
|
+
import { AddonCountryEntity } from '../../catalog/addon/country.entity';
|
|
4
|
+
import { CountryProductEntity } from '../../catalog/product/country.entity';
|
|
3
5
|
import { CompanyEntity } from '../../profile/company/company.entity';
|
|
4
|
-
import { CurrencyEntity } from '../currency/currency.entity';
|
|
5
6
|
import { UserEntity } from '../../user/user.entity';
|
|
6
|
-
import { CountryProductEntity } from '../../catalog/product/country.entity';
|
|
7
|
-
import { AddonCountryEntity } from '../../catalog/addon/country.entity';
|
|
8
|
-
import { DrivingCategoryEntity } from '../driving/category.entity';
|
|
9
7
|
import { TrackableEntity } from '../../utils/trackable';
|
|
8
|
+
import { CurrencyEntity } from '../currency/currency.entity';
|
|
9
|
+
import { DrivingCategoryEntity } from '../driving/category.entity';
|
|
10
10
|
/**
|
|
11
11
|
* Represents a country in the system.
|
|
12
12
|
* Countries define regional settings including languages, currency, timezones,
|
|
@@ -114,6 +114,8 @@ export declare class CountryEntity extends TrackableEntity<Country> {
|
|
|
114
114
|
* @returns Country model with basic information for listings
|
|
115
115
|
*/
|
|
116
116
|
toSummary(): Country;
|
|
117
|
+
isLanguageSupported(language: Language): boolean;
|
|
118
|
+
isTimezoneSupported(timezone: string): boolean;
|
|
117
119
|
/**
|
|
118
120
|
* Retrieves activity history for this country
|
|
119
121
|
* @returns Promise resolving to array of Activity instances tracking creation, updates, and status changes
|
|
@@ -10,18 +10,18 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CountryEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const shared_1 = require("@driveup/shared");
|
|
15
13
|
const common_1 = require("@driveup/common");
|
|
14
|
+
const shared_1 = require("@driveup/shared");
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
16
|
+
const country_entity_1 = require("../../catalog/addon/country.entity");
|
|
17
|
+
const country_entity_2 = require("../../catalog/product/country.entity");
|
|
16
18
|
const company_entity_1 = require("../../profile/company/company.entity");
|
|
17
|
-
const currency_entity_1 = require("../currency/currency.entity");
|
|
18
19
|
const user_entity_1 = require("../../user/user.entity");
|
|
19
|
-
const
|
|
20
|
-
const
|
|
20
|
+
const activity_helper_1 = require("../../utils/activity.helper");
|
|
21
|
+
const trackable_1 = require("../../utils/trackable");
|
|
22
|
+
const currency_entity_1 = require("../currency/currency.entity");
|
|
21
23
|
const category_entity_1 = require("../driving/category.entity");
|
|
22
24
|
const staff_entity_1 = require("../staff/staff.entity");
|
|
23
|
-
const trackable_1 = require("../../utils/trackable");
|
|
24
|
-
const activity_helper_1 = require("../../utils/activity.helper");
|
|
25
25
|
/**
|
|
26
26
|
* Represents a country in the system.
|
|
27
27
|
* Countries define regional settings including languages, currency, timezones,
|
|
@@ -72,6 +72,12 @@ let CountryEntity = class CountryEntity extends trackable_1.TrackableEntity {
|
|
|
72
72
|
active: this.active
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
+
isLanguageSupported(language) {
|
|
76
|
+
return this.languages?.includes(language);
|
|
77
|
+
}
|
|
78
|
+
isTimezoneSupported(timezone) {
|
|
79
|
+
return this.timezones?.includes(timezone);
|
|
80
|
+
}
|
|
75
81
|
/**
|
|
76
82
|
* Retrieves activity history for this country
|
|
77
83
|
* @returns Promise resolving to array of Activity instances tracking creation, updates, and status changes
|
|
@@ -173,11 +179,11 @@ __decorate([
|
|
|
173
179
|
__metadata("design:type", Promise)
|
|
174
180
|
], CountryEntity.prototype, "currency", void 0);
|
|
175
181
|
__decorate([
|
|
176
|
-
(0, typeorm_1.OneToMany)(() =>
|
|
182
|
+
(0, typeorm_1.OneToMany)(() => country_entity_2.CountryProductEntity, product => product.country),
|
|
177
183
|
__metadata("design:type", Promise)
|
|
178
184
|
], CountryEntity.prototype, "products", void 0);
|
|
179
185
|
__decorate([
|
|
180
|
-
(0, typeorm_1.OneToMany)(() =>
|
|
186
|
+
(0, typeorm_1.OneToMany)(() => country_entity_1.AddonCountryEntity, product => product.country),
|
|
181
187
|
__metadata("design:type", Promise)
|
|
182
188
|
], CountryEntity.prototype, "addons", void 0);
|
|
183
189
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"country.entity.js","sourceRoot":"","sources":["../../../src/system/country/country.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA+D;
|
|
1
|
+
{"version":3,"file":"country.entity.js","sourceRoot":"","sources":["../../../src/system/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,EAAC,GAAG,EAAE,CAAC,gCAAc,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC;;+CAC9B;AAMlC;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,mCAAkB,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;;6CAC1B;AAMtC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wBAAU,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;;4CACrB;AAM7B;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8BAAa,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;;gDACvB;AAMpC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAqB,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;;wDACjB;wBArJxC,aAAa;IADzB,IAAA,gBAAM,EAAC,iBAAiB,CAAC;;GACb,aAAa,CAuNzB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Activity, Currency } from '@driveup/common';
|
|
2
|
-
import { CountryEntity } from '../country/country.entity';
|
|
3
2
|
import { TrackableEntity } from '../../utils/trackable';
|
|
3
|
+
import { CountryEntity } from '../country/country.entity';
|
|
4
4
|
/**
|
|
5
5
|
* Represents a currency in the system.
|
|
6
6
|
* Currencies define monetary units used in different countries,
|
|
@@ -10,13 +10,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CurrencyEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const shared_1 = require("@driveup/shared");
|
|
15
13
|
const common_1 = require("@driveup/common");
|
|
14
|
+
const shared_1 = require("@driveup/shared");
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
16
|
+
const activity_helper_1 = require("../../utils/activity.helper");
|
|
17
|
+
const trackable_1 = require("../../utils/trackable");
|
|
16
18
|
const country_entity_1 = require("../country/country.entity");
|
|
17
19
|
const staff_entity_1 = require("../staff/staff.entity");
|
|
18
|
-
const trackable_1 = require("../../utils/trackable");
|
|
19
|
-
const activity_helper_1 = require("../../utils/activity.helper");
|
|
20
20
|
/**
|
|
21
21
|
* Represents a currency in the system.
|
|
22
22
|
* Currencies define monetary units used in different countries,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"currency.entity.js","sourceRoot":"","sources":["../../../src/system/currency/currency.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"currency.entity.js","sourceRoot":"","sources":["../../../src/system/currency/currency.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAqD;AACrD,4CAA+C;AAC/C,qCAAoD;AAEpD,iEAAyD;AACzD,qDAAwD;AACxD,8DAA0D;AAC1D,wDAAoD;AAEpD;;;;;;GAMG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,2BAAyB;IAwC5D;;;OAGG;IACH,YAAY,KAA+B;QAC1C,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,OAAO;QACN,OAAO,IAAI,iBAAQ,CAAC;YACnB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM;SACnB,CAAC,CAAC;IACJ,CAAC;IAED,SAAS;QACR,OAAO,IAAI,CAAC,OAAO,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{ Activity, Content, DrivingCategory, Metadata } from '@driveup/common';
|
|
2
|
+
import { ColorContext, Language } from '@driveup/shared';
|
|
4
3
|
import { ProgramEntity } from '../../catalog/program/program.entity';
|
|
4
|
+
import { SeedCourseEntity } from '../../catalog/seed/courses/course.entity';
|
|
5
|
+
import { CompanyCourseEntity } from '../../profile/company/course/course.entity';
|
|
6
|
+
import { CompanyMedicalProductEntity } from '../../profile/company/medical/product.entity';
|
|
5
7
|
import { StudentLicenceEntity } from '../../profile/student/program/licence/licence.entity';
|
|
6
8
|
import { StudentMedicalCertificateEntity } from '../../profile/student/program/medical/certificate.entity';
|
|
7
|
-
import { CompanyMedicalProductEntity } from '../../profile/company/medical/product.entity';
|
|
8
|
-
import { CompanyCourseEntity } from '../../profile/company/course/course.entity';
|
|
9
|
-
import { SeedCourseEntity } from '../../catalog/seed/courses/course.entity';
|
|
10
|
-
import { SeedVehicleEntity } from './vehicle.entity';
|
|
11
9
|
import { TrackableEntity } from '../../utils/trackable';
|
|
10
|
+
import { CountryEntity } from '../country/country.entity';
|
|
11
|
+
import { SeedVehicleEntity } from './vehicle.entity';
|
|
12
12
|
/**
|
|
13
13
|
* Represents a driving license category in the system.
|
|
14
14
|
* Categories define the type of vehicle or driving qualification (e.g., A, B, C1, C1E).
|
|
@@ -10,22 +10,22 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.DrivingCategoryEntity = void 0;
|
|
13
|
+
const common_1 = require("@driveup/common");
|
|
14
|
+
const shared_1 = require("@driveup/shared");
|
|
15
|
+
const nestjs_i18n_1 = require("nestjs-i18n");
|
|
13
16
|
const typeorm_1 = require("typeorm");
|
|
14
17
|
const typeorm_2 = require("typeorm");
|
|
15
|
-
const nestjs_i18n_1 = require("nestjs-i18n");
|
|
16
|
-
const shared_1 = require("@driveup/shared");
|
|
17
|
-
const common_1 = require("@driveup/common");
|
|
18
|
-
const staff_entity_1 = require("../staff/staff.entity");
|
|
19
|
-
const country_entity_1 = require("../country/country.entity");
|
|
20
18
|
const program_entity_1 = require("../../catalog/program/program.entity");
|
|
19
|
+
const course_entity_1 = require("../../catalog/seed/courses/course.entity");
|
|
20
|
+
const course_entity_2 = require("../../profile/company/course/course.entity");
|
|
21
|
+
const product_entity_1 = require("../../profile/company/medical/product.entity");
|
|
21
22
|
const licence_entity_1 = require("../../profile/student/program/licence/licence.entity");
|
|
22
23
|
const certificate_entity_1 = require("../../profile/student/program/medical/certificate.entity");
|
|
23
|
-
const product_entity_1 = require("../../profile/company/medical/product.entity");
|
|
24
|
-
const course_entity_1 = require("../../profile/company/course/course.entity");
|
|
25
|
-
const course_entity_2 = require("../../catalog/seed/courses/course.entity");
|
|
26
|
-
const vehicle_entity_1 = require("./vehicle.entity");
|
|
27
|
-
const trackable_1 = require("../../utils/trackable");
|
|
28
24
|
const activity_helper_1 = require("../../utils/activity.helper");
|
|
25
|
+
const trackable_1 = require("../../utils/trackable");
|
|
26
|
+
const country_entity_1 = require("../country/country.entity");
|
|
27
|
+
const staff_entity_1 = require("../staff/staff.entity");
|
|
28
|
+
const vehicle_entity_1 = require("./vehicle.entity");
|
|
29
29
|
/**
|
|
30
30
|
* Represents a driving license category in the system.
|
|
31
31
|
* Categories define the type of vehicle or driving qualification (e.g., A, B, C1, C1E).
|
|
@@ -191,7 +191,7 @@ __decorate([
|
|
|
191
191
|
__metadata("design:type", Promise)
|
|
192
192
|
], DrivingCategoryEntity.prototype, "companyMedicalProducts", void 0);
|
|
193
193
|
__decorate([
|
|
194
|
-
(0, typeorm_2.OneToMany)(() =>
|
|
194
|
+
(0, typeorm_2.OneToMany)(() => course_entity_2.CompanyCourseEntity, training => training.category),
|
|
195
195
|
__metadata("design:type", Promise)
|
|
196
196
|
], DrivingCategoryEntity.prototype, "companyCourses", void 0);
|
|
197
197
|
__decorate([
|
|
@@ -207,7 +207,7 @@ __decorate([
|
|
|
207
207
|
__metadata("design:type", Promise)
|
|
208
208
|
], DrivingCategoryEntity.prototype, "programs", void 0);
|
|
209
209
|
__decorate([
|
|
210
|
-
(0, typeorm_2.OneToMany)(() =>
|
|
210
|
+
(0, typeorm_2.OneToMany)(() => course_entity_1.SeedCourseEntity, training => training.category),
|
|
211
211
|
__metadata("design:type", Promise)
|
|
212
212
|
], DrivingCategoryEntity.prototype, "seedCourses", void 0);
|
|
213
213
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.entity.js","sourceRoot":"","sources":["../../../src/system/driving/category.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"category.entity.js","sourceRoot":"","sources":["../../../src/system/driving/category.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA+E;AAC/E,4CAAuE;AACvE,6CAA0C;AAC1C,qCAAyC;AACzC,qCAA+C;AAE/C,yEAAqE;AACrE,4EAA4E;AAC5E,8EAAiF;AACjF,iFAA2F;AAC3F,yFAA4F;AAC5F,iGAA2G;AAC3G,iEAAyD;AACzD,qDAAwD;AACxD,8DAA0D;AAC1D,wDAAoD;AACpD,qDAAqD;AAErD;;;;;;GAMG;AAEI,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,2BAAgC;IAmK1E;;;OAGG;IACH,YAAY,KAAsC;QACjD,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACH,OAAO,CAAC,IAAe;QACtB,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAA;QAC7C,OAAO,IAAI,wBAAe,CAAC;YAC1B,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,KAAK,EAAE,WAAW,EAAE,KAAK;YACzB,WAAW,EAAE,WAAW,EAAE,WAAW;YACrC,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI,IAAI,CAAC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