@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,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Language, CatalogType, ProductType, AppointmentType, ColorContext } from '@driveup/shared';
|
|
2
|
+
import { Content, Product, Activity } from '@driveup/common';
|
|
3
|
+
import { CountryProductEntity } from './country.entity';
|
|
4
4
|
import { TrackableEntity } from '../../utils/trackable';
|
|
5
5
|
/**
|
|
6
6
|
* System products entity representing the master catalog of available products.
|
|
@@ -11,13 +11,13 @@ export declare class ProductEntity extends TrackableEntity<Product> {
|
|
|
11
11
|
* Product catalog type categorization.
|
|
12
12
|
* @default CatalogType.Driving
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
catalogType: CatalogType;
|
|
15
15
|
/**
|
|
16
16
|
* Specific product type
|
|
17
17
|
* Must be unique across all products.
|
|
18
18
|
* @default ProductType.DrivingCar
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
productType: ProductType;
|
|
21
21
|
/**
|
|
22
22
|
* UI color theme context for displaying the product.
|
|
23
23
|
* @default ColorContext.Primary
|
|
@@ -62,7 +62,7 @@ export declare class ProductEntity extends TrackableEntity<Product> {
|
|
|
62
62
|
/**
|
|
63
63
|
* Country product definitions and enabling
|
|
64
64
|
*/
|
|
65
|
-
countries: Promise<
|
|
65
|
+
countries: Promise<CountryProductEntity[]>;
|
|
66
66
|
/**
|
|
67
67
|
* Creates a new ProductEntity instance
|
|
68
68
|
* @param props - Partial product properties to initialize the entity
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ProductEntity = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const nestjs_i18n_1 = require("nestjs-i18n");
|
|
15
|
+
const shared_1 = require("@driveup/shared");
|
|
15
16
|
const common_1 = require("@driveup/common");
|
|
16
|
-
const common_2 = require("@driveup/common");
|
|
17
17
|
const country_entity_1 = require("./country.entity");
|
|
18
18
|
const staff_entity_1 = require("../../system/staff/staff.entity");
|
|
19
19
|
const trackable_1 = require("../../utils/trackable");
|
|
@@ -37,15 +37,18 @@ let ProductEntity = class ProductEntity extends trackable_1.TrackableEntity {
|
|
|
37
37
|
* @returns Product model with localized content
|
|
38
38
|
*/
|
|
39
39
|
toModel(lang) {
|
|
40
|
+
// TODO: in "Product" model in @driveup/common, change the following field names, to be matched with the field names in the entity "ProductEntity":
|
|
41
|
+
// 1. catalog --> catalogType
|
|
42
|
+
// 2. product --> productType
|
|
40
43
|
const translation = this.getTranslation(lang);
|
|
41
44
|
return new common_1.Product({
|
|
42
45
|
id: this.id,
|
|
43
|
-
catalog: this.
|
|
44
|
-
type: this.
|
|
46
|
+
catalog: this.catalogType,
|
|
47
|
+
type: this.productType,
|
|
45
48
|
color: this.color,
|
|
46
|
-
title: translation
|
|
47
|
-
description: translation
|
|
48
|
-
imageUrl: translation
|
|
49
|
+
title: translation?.title,
|
|
50
|
+
description: translation?.description,
|
|
51
|
+
imageUrl: translation?.url || this.imageUrl,
|
|
49
52
|
enabled: this.active,
|
|
50
53
|
sort: this.sort
|
|
51
54
|
});
|
|
@@ -70,7 +73,7 @@ let ProductEntity = class ProductEntity extends trackable_1.TrackableEntity {
|
|
|
70
73
|
title: translation?.title,
|
|
71
74
|
description: translation?.description,
|
|
72
75
|
content: translation?.content,
|
|
73
|
-
|
|
76
|
+
url: translation?.url || this.imageUrl,
|
|
74
77
|
link: translation?.link,
|
|
75
78
|
});
|
|
76
79
|
}
|
|
@@ -83,7 +86,7 @@ let ProductEntity = class ProductEntity extends trackable_1.TrackableEntity {
|
|
|
83
86
|
title: t.title,
|
|
84
87
|
description: t.description,
|
|
85
88
|
content: t.content,
|
|
86
|
-
|
|
89
|
+
url: t.url,
|
|
87
90
|
link: t.link,
|
|
88
91
|
language: t.language
|
|
89
92
|
}));
|
|
@@ -94,14 +97,10 @@ let ProductEntity = class ProductEntity extends trackable_1.TrackableEntity {
|
|
|
94
97
|
*/
|
|
95
98
|
async getActivities() {
|
|
96
99
|
const activities = [];
|
|
97
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy,
|
|
98
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.
|
|
99
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.
|
|
100
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.
|
|
101
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.enabledBy, common_2.ActivityType.enabledBy, staff_entity_1.StaffEntity));
|
|
102
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.enabledOn, common_2.ActivityType.enabledOn));
|
|
103
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.disabledBy, common_2.ActivityType.disabledBy, staff_entity_1.StaffEntity));
|
|
104
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.disabledOn, common_2.ActivityType.disabledOn));
|
|
100
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy, this.createdOn, shared_1.ActivityType.created, staff_entity_1.StaffEntity));
|
|
101
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.updatedBy, this.updatedOn, shared_1.ActivityType.updated, staff_entity_1.StaffEntity));
|
|
102
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.enabledBy, this.enabledOn, shared_1.ActivityType.enabled, staff_entity_1.StaffEntity));
|
|
103
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.disabledBy, this.disabledOn, shared_1.ActivityType.disabled, staff_entity_1.StaffEntity));
|
|
105
104
|
return activities.filter(a => a);
|
|
106
105
|
}
|
|
107
106
|
/**
|
|
@@ -109,16 +108,16 @@ let ProductEntity = class ProductEntity extends trackable_1.TrackableEntity {
|
|
|
109
108
|
* @returns AppointmentType corresponding to the product catalog
|
|
110
109
|
*/
|
|
111
110
|
get appointmentType() {
|
|
112
|
-
switch (this.
|
|
113
|
-
case
|
|
111
|
+
switch (this.catalogType) {
|
|
112
|
+
case shared_1.CatalogType.Medical:
|
|
114
113
|
// currently only examination products exist in medical catalog
|
|
115
|
-
return
|
|
116
|
-
case
|
|
117
|
-
return
|
|
118
|
-
case
|
|
119
|
-
return
|
|
120
|
-
case
|
|
121
|
-
return
|
|
114
|
+
return shared_1.AppointmentType.Medical;
|
|
115
|
+
case shared_1.CatalogType.Preperation:
|
|
116
|
+
return shared_1.AppointmentType.Course;
|
|
117
|
+
case shared_1.CatalogType.Driving:
|
|
118
|
+
return shared_1.AppointmentType.Driving;
|
|
119
|
+
case shared_1.CatalogType.Completion:
|
|
120
|
+
return shared_1.AppointmentType.Course;
|
|
122
121
|
default:
|
|
123
122
|
return;
|
|
124
123
|
}
|
|
@@ -128,28 +127,28 @@ exports.ProductEntity = ProductEntity;
|
|
|
128
127
|
__decorate([
|
|
129
128
|
(0, typeorm_1.Column)({
|
|
130
129
|
type: 'enum',
|
|
131
|
-
enum:
|
|
132
|
-
default:
|
|
130
|
+
enum: shared_1.CatalogType,
|
|
131
|
+
default: shared_1.CatalogType.Driving,
|
|
133
132
|
nullable: false
|
|
134
133
|
}),
|
|
135
134
|
__metadata("design:type", String)
|
|
136
|
-
], ProductEntity.prototype, "
|
|
135
|
+
], ProductEntity.prototype, "catalogType", void 0);
|
|
137
136
|
__decorate([
|
|
138
137
|
(0, typeorm_1.Column)({
|
|
139
138
|
type: 'enum',
|
|
140
139
|
name: 'productType',
|
|
141
140
|
unique: true,
|
|
142
|
-
enum:
|
|
143
|
-
default:
|
|
141
|
+
enum: shared_1.ProductType,
|
|
142
|
+
default: shared_1.ProductType.DrivingCar,
|
|
144
143
|
nullable: false
|
|
145
144
|
}),
|
|
146
145
|
__metadata("design:type", String)
|
|
147
|
-
], ProductEntity.prototype, "
|
|
146
|
+
], ProductEntity.prototype, "productType", void 0);
|
|
148
147
|
__decorate([
|
|
149
148
|
(0, typeorm_1.Column)({
|
|
150
149
|
type: 'enum',
|
|
151
|
-
enum:
|
|
152
|
-
default:
|
|
150
|
+
enum: shared_1.ColorContext,
|
|
151
|
+
default: shared_1.ColorContext.Primary,
|
|
153
152
|
nullable: false
|
|
154
153
|
}),
|
|
155
154
|
__metadata("design:type", String)
|
|
@@ -197,7 +196,7 @@ __decorate([
|
|
|
197
196
|
__metadata("design:type", Date)
|
|
198
197
|
], ProductEntity.prototype, "disabledOn", void 0);
|
|
199
198
|
__decorate([
|
|
200
|
-
(0, typeorm_1.OneToMany)(() => country_entity_1.
|
|
199
|
+
(0, typeorm_1.OneToMany)(() => country_entity_1.CountryProductEntity, country => country.product),
|
|
201
200
|
__metadata("design:type", Promise)
|
|
202
201
|
], ProductEntity.prototype, "countries", void 0);
|
|
203
202
|
exports.ProductEntity = ProductEntity = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.entity.js","sourceRoot":"","sources":["../../../src/catalog/product/product.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAoD;AACpD,6CAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"product.entity.js","sourceRoot":"","sources":["../../../src/catalog/product/product.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAoD;AACpD,6CAA0C;AAC1C,4CAAkH;AAClH,4CAA6D;AAC7D,qDAAwD;AACxD,kEAA8D;AAC9D,qDAAwD;AACxD,iEAAyD;AAEzD;;;GAGG;AAEI,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,2BAAwB;IA6G1D;;;OAGG;IACH,YAAY,KAA8B;QACzC,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACH,OAAO,CAAC,IAAe;QACtB,mJAAmJ;QACnJ,6BAA6B;QAC7B,6BAA6B;QAC7B,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC9C,OAAO,IAAI,gBAAO,CAAC;YAClB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,OAAO,EAAE,IAAI,CAAC,WAAW;YACzB,IAAI,EAAE,IAAI,CAAC,WAAW;YACtB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,WAAW,EAAE,KAAK;YACzB,WAAW,EAAE,WAAW,EAAE,WAAW;YACrC,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ;YAC3C,OAAO,EAAE,IAAI,CAAC,MAAM;YACpB,IAAI,EAAE,IAAI,CAAC,IAAI;SACf,CAAC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,SAAS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EAAC,gBAAgB,CAAC;;GACZ,aAAa,CAsNzB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Language, ProductType,
|
|
2
|
-
import { Activity, Content } from '@driveup/common';
|
|
1
|
+
import { Language, ProductType, ProgramType } from '@driveup/shared';
|
|
2
|
+
import { Program, Activity, Content } from '@driveup/common';
|
|
3
3
|
import { StudentProgramEntity } from '../../profile/student/program/program.entity';
|
|
4
4
|
import { DrivingCategoryEntity } from '../../system/driving/category.entity';
|
|
5
5
|
import { TrackableEntity } from '../../utils/trackable';
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ProgramEntity = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const nestjs_i18n_1 = require("nestjs-i18n");
|
|
15
|
+
const shared_1 = require("@driveup/shared");
|
|
15
16
|
const common_1 = require("@driveup/common");
|
|
16
|
-
const common_2 = require("@driveup/common");
|
|
17
17
|
const staff_entity_1 = require("../../system/staff/staff.entity");
|
|
18
18
|
const program_entity_1 = require("../../profile/student/program/program.entity");
|
|
19
19
|
const category_entity_1 = require("../../system/driving/category.entity");
|
|
@@ -47,9 +47,9 @@ let ProgramEntity = class ProgramEntity extends trackable_1.TrackableEntity {
|
|
|
47
47
|
return new common_1.Program({
|
|
48
48
|
id: this.id,
|
|
49
49
|
category: category,
|
|
50
|
-
title: translation
|
|
51
|
-
description: translation
|
|
52
|
-
imageUrl: translation
|
|
50
|
+
title: translation?.title,
|
|
51
|
+
description: translation?.description,
|
|
52
|
+
imageUrl: translation?.url || this.imageUrl,
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
@@ -68,11 +68,11 @@ let ProgramEntity = class ProgramEntity extends trackable_1.TrackableEntity {
|
|
|
68
68
|
getTranslation(lang) {
|
|
69
69
|
const language = lang || nestjs_i18n_1.I18nContext.current()?.lang;
|
|
70
70
|
const translation = this.translations?.find(t => t.language === language);
|
|
71
|
-
return new
|
|
71
|
+
return new common_1.Content({
|
|
72
72
|
title: translation?.title,
|
|
73
73
|
description: translation?.description,
|
|
74
74
|
content: translation?.content,
|
|
75
|
-
|
|
75
|
+
url: translation?.url || this.imageUrl,
|
|
76
76
|
link: translation?.link,
|
|
77
77
|
});
|
|
78
78
|
}
|
|
@@ -81,11 +81,11 @@ let ProgramEntity = class ProgramEntity extends trackable_1.TrackableEntity {
|
|
|
81
81
|
* @returns Array of Content instances for all languages
|
|
82
82
|
*/
|
|
83
83
|
getTranslations() {
|
|
84
|
-
return this.translations?.map(t => new
|
|
84
|
+
return this.translations?.map(t => new common_1.Content({
|
|
85
85
|
title: t.title,
|
|
86
86
|
description: t.description,
|
|
87
87
|
content: t.content,
|
|
88
|
-
|
|
88
|
+
url: t.url,
|
|
89
89
|
link: t.link,
|
|
90
90
|
language: t.language
|
|
91
91
|
}));
|
|
@@ -96,14 +96,10 @@ let ProgramEntity = class ProgramEntity extends trackable_1.TrackableEntity {
|
|
|
96
96
|
*/
|
|
97
97
|
async getActivities() {
|
|
98
98
|
const activities = [];
|
|
99
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy,
|
|
100
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.
|
|
101
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.
|
|
102
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.
|
|
103
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.enabledBy, common_2.ActivityType.enabledBy, staff_entity_1.StaffEntity));
|
|
104
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.enabledOn, common_2.ActivityType.createdOn));
|
|
105
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.disabledBy, common_2.ActivityType.disabledBy, staff_entity_1.StaffEntity));
|
|
106
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.disabledOn, common_2.ActivityType.disabledOn));
|
|
99
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy, this.createdOn, shared_1.ActivityType.created, staff_entity_1.StaffEntity));
|
|
100
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.updatedBy, this.updatedOn, shared_1.ActivityType.updated, staff_entity_1.StaffEntity));
|
|
101
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.enabledBy, this.enabledOn, shared_1.ActivityType.enabled, staff_entity_1.StaffEntity));
|
|
102
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.disabledBy, this.disabledOn, shared_1.ActivityType.disabled, staff_entity_1.StaffEntity));
|
|
107
103
|
return activities.filter(a => a);
|
|
108
104
|
}
|
|
109
105
|
};
|
|
@@ -113,8 +109,8 @@ __decorate([
|
|
|
113
109
|
type: 'enum',
|
|
114
110
|
name: 'programType',
|
|
115
111
|
unique: true,
|
|
116
|
-
enum:
|
|
117
|
-
default:
|
|
112
|
+
enum: shared_1.ProgramType,
|
|
113
|
+
default: shared_1.ProgramType.Driving,
|
|
118
114
|
nullable: false
|
|
119
115
|
}),
|
|
120
116
|
__metadata("design:type", String)
|
|
@@ -122,8 +118,8 @@ __decorate([
|
|
|
122
118
|
__decorate([
|
|
123
119
|
(0, typeorm_1.Column)({
|
|
124
120
|
type: 'set',
|
|
125
|
-
enum:
|
|
126
|
-
default: [
|
|
121
|
+
enum: shared_1.ProductType,
|
|
122
|
+
default: [shared_1.ProductType.DrivingCar],
|
|
127
123
|
nullable: false
|
|
128
124
|
}),
|
|
129
125
|
__metadata("design:type", Array)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.entity.js","sourceRoot":"","sources":["../../../src/catalog/program/program.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,6CAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"program.entity.js","sourceRoot":"","sources":["../../../src/catalog/program/program.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,6CAA0C;AAC1C,4CAAmF;AACnF,4CAA6D;AAC7D,kEAA8D;AAC9D,iFAA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C,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BAC9B,IAAI;iDAAC;AAMjB;IADC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,uCAAqB,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC;;+CAC/B;AAMxC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAoB,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;;sDACjB;wBA3GrC,aAAa;IADzB,IAAA,gBAAM,EAAC,gBAAgB,CAAC;;GACZ,aAAa,CA4LzB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Language,
|
|
2
|
-
import {
|
|
1
|
+
import { Language, AssetType, AssetScope } from '@driveup/shared';
|
|
2
|
+
import { Content, Activity, Asset } from '@driveup/common';
|
|
3
3
|
import { TrackableEntity } from '../../../utils/trackable';
|
|
4
4
|
/**
|
|
5
5
|
* Represents a catalog asset (image, video, document) for promotional or educational purposes.
|
|
@@ -8,7 +8,7 @@ import { TrackableEntity } from '../../../utils/trackable';
|
|
|
8
8
|
*
|
|
9
9
|
* @extends TrackableEntity<Asset>
|
|
10
10
|
*/
|
|
11
|
-
export declare class
|
|
11
|
+
export declare class CatalogAssetEntity extends TrackableEntity<Asset> {
|
|
12
12
|
/**
|
|
13
13
|
* Reference to the country this asset belongs to
|
|
14
14
|
*/
|
|
@@ -24,8 +24,7 @@ export declare class CatalogAgentAssetEntity extends TrackableEntity<Asset> {
|
|
|
24
24
|
*/
|
|
25
25
|
type: AssetType;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
* Used for console administration only
|
|
27
|
+
* URL of the asset
|
|
29
28
|
*/
|
|
30
29
|
url: string;
|
|
31
30
|
/**
|
|
@@ -33,10 +32,10 @@ export declare class CatalogAgentAssetEntity extends TrackableEntity<Asset> {
|
|
|
33
32
|
*/
|
|
34
33
|
translations: Content[];
|
|
35
34
|
/**
|
|
36
|
-
* Creates a new
|
|
35
|
+
* Creates a new CatalogAssetEntity instance
|
|
37
36
|
* @param props - Partial properties to initialize the entity
|
|
38
37
|
*/
|
|
39
|
-
constructor(props?: Partial<
|
|
38
|
+
constructor(props?: Partial<CatalogAssetEntity>);
|
|
40
39
|
/**
|
|
41
40
|
* Converts the entity to an Asset model instance
|
|
42
41
|
* @param lang - Optional language for translations
|
|
@@ -9,11 +9,11 @@ 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
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.CatalogAssetEntity = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const nestjs_i18n_1 = require("nestjs-i18n");
|
|
15
|
+
const shared_1 = require("@driveup/shared");
|
|
15
16
|
const common_1 = require("@driveup/common");
|
|
16
|
-
const common_2 = require("@driveup/common");
|
|
17
17
|
const staff_entity_1 = require("../../../system/staff/staff.entity");
|
|
18
18
|
const trackable_1 = require("../../../utils/trackable");
|
|
19
19
|
const activity_helper_1 = require("../../../utils/activity.helper");
|
|
@@ -24,9 +24,9 @@ const activity_helper_1 = require("../../../utils/activity.helper");
|
|
|
24
24
|
*
|
|
25
25
|
* @extends TrackableEntity<Asset>
|
|
26
26
|
*/
|
|
27
|
-
let
|
|
27
|
+
let CatalogAssetEntity = class CatalogAssetEntity extends trackable_1.TrackableEntity {
|
|
28
28
|
/**
|
|
29
|
-
* Creates a new
|
|
29
|
+
* Creates a new CatalogAssetEntity instance
|
|
30
30
|
* @param props - Partial properties to initialize the entity
|
|
31
31
|
*/
|
|
32
32
|
constructor(props) {
|
|
@@ -40,7 +40,7 @@ let CatalogAgentAssetEntity = class CatalogAgentAssetEntity extends trackable_1.
|
|
|
40
40
|
*/
|
|
41
41
|
toModel(lang) {
|
|
42
42
|
const transaltion = this.getTranslation(lang);
|
|
43
|
-
return new
|
|
43
|
+
return new common_1.Asset({
|
|
44
44
|
scope: this.scope,
|
|
45
45
|
type: this.type,
|
|
46
46
|
url: this.url,
|
|
@@ -80,7 +80,7 @@ let CatalogAgentAssetEntity = class CatalogAgentAssetEntity extends trackable_1.
|
|
|
80
80
|
title: t.title,
|
|
81
81
|
description: t.description,
|
|
82
82
|
content: t.content,
|
|
83
|
-
|
|
83
|
+
url: t.url,
|
|
84
84
|
link: t.link,
|
|
85
85
|
language: t.language
|
|
86
86
|
}));
|
|
@@ -91,41 +91,42 @@ let CatalogAgentAssetEntity = class CatalogAgentAssetEntity extends trackable_1.
|
|
|
91
91
|
*/
|
|
92
92
|
async getActivities() {
|
|
93
93
|
const activities = [];
|
|
94
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy,
|
|
95
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.
|
|
96
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.updatedBy, common_1.ActivityType.updatedBy, staff_entity_1.StaffEntity));
|
|
97
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.updatedOn, common_1.ActivityType.updatedOn));
|
|
94
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy, this.createdOn, shared_1.ActivityType.created, staff_entity_1.StaffEntity));
|
|
95
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.updatedBy, this.updatedOn, shared_1.ActivityType.updated, staff_entity_1.StaffEntity));
|
|
98
96
|
return activities.filter(a => a);
|
|
99
97
|
}
|
|
100
98
|
};
|
|
101
|
-
exports.
|
|
99
|
+
exports.CatalogAssetEntity = CatalogAssetEntity;
|
|
102
100
|
__decorate([
|
|
103
101
|
(0, typeorm_1.Column)(),
|
|
104
102
|
__metadata("design:type", Number)
|
|
105
|
-
],
|
|
103
|
+
], CatalogAssetEntity.prototype, "countryId", void 0);
|
|
106
104
|
__decorate([
|
|
107
105
|
(0, typeorm_1.Column)({
|
|
108
106
|
type: 'enum',
|
|
109
|
-
enum:
|
|
110
|
-
default:
|
|
107
|
+
enum: shared_1.AssetScope,
|
|
108
|
+
default: shared_1.AssetScope.DriveupPromotion,
|
|
111
109
|
nullable: false
|
|
112
110
|
}),
|
|
113
111
|
__metadata("design:type", String)
|
|
114
|
-
],
|
|
112
|
+
], CatalogAssetEntity.prototype, "scope", void 0);
|
|
115
113
|
__decorate([
|
|
116
114
|
(0, typeorm_1.Column)({
|
|
117
115
|
type: 'enum',
|
|
118
116
|
name: 'assetType',
|
|
119
|
-
enum:
|
|
120
|
-
default:
|
|
117
|
+
enum: shared_1.AssetType,
|
|
118
|
+
default: shared_1.AssetType.Image,
|
|
121
119
|
nullable: false
|
|
122
120
|
}),
|
|
123
121
|
__metadata("design:type", String)
|
|
124
|
-
],
|
|
122
|
+
], CatalogAssetEntity.prototype, "type", void 0);
|
|
125
123
|
__decorate([
|
|
126
|
-
(0, typeorm_1.Column)(
|
|
124
|
+
(0, typeorm_1.Column)({
|
|
125
|
+
nullable: true,
|
|
126
|
+
default: null
|
|
127
|
+
}),
|
|
127
128
|
__metadata("design:type", String)
|
|
128
|
-
],
|
|
129
|
+
], CatalogAssetEntity.prototype, "url", void 0);
|
|
129
130
|
__decorate([
|
|
130
131
|
(0, typeorm_1.Column)({
|
|
131
132
|
type: 'simple-json',
|
|
@@ -133,9 +134,9 @@ __decorate([
|
|
|
133
134
|
default: null
|
|
134
135
|
}),
|
|
135
136
|
__metadata("design:type", Array)
|
|
136
|
-
],
|
|
137
|
-
exports.
|
|
137
|
+
], CatalogAssetEntity.prototype, "translations", void 0);
|
|
138
|
+
exports.CatalogAssetEntity = CatalogAssetEntity = __decorate([
|
|
138
139
|
(0, typeorm_1.Entity)('systemCatalogAssets'),
|
|
139
140
|
__metadata("design:paramtypes", [Object])
|
|
140
|
-
],
|
|
141
|
+
], CatalogAssetEntity);
|
|
141
142
|
//# sourceMappingURL=asset.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset.entity.js","sourceRoot":"","sources":["../../../../src/catalog/seed/assets/asset.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAyC;AACzC,6CAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"asset.entity.js","sourceRoot":"","sources":["../../../../src/catalog/seed/assets/asset.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAyC;AACzC,6CAA0C;AAC1C,4CAAgF;AAChF,4CAA2D;AAC3D,qEAAiE;AACjE,wDAA2D;AAC3D,oEAA4D;AAE5D;;;;;;GAMG;AAEI,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,2BAAsB;IAoD7D;;;OAGG;IACH,YAAY,KAAmC;QAC9C,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,cAAK,CAAC;YAChB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,KAAK,EAAE,WAAW,EAAE,KAAK;YACzB,WAAW,EAAE,WAAW,EAAE,WAAW;SACrC,CAAC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,SAAS,CAAC,IAAe;QACxB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAED;;;;OAIG;IACH,cAAc,CAAC,IAAe;QAC7B,MAAM,QAAQ,GAAG,IAAI,IAAI,yBAAW,CAAC,OAAO,EAAE,EAAE,IAAgB,CAAC;QACjE,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,K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E,mBAAU,CAAC,gBAAgB;QACpC,QAAQ,EAAE,KAAK;KACf,CAAC;;iDACgB;AAalB;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;;gDACc;AAShB;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;+CACU;AAUZ;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;wDACsB;6BAlDZ,kBAAkB;IAD9B,IAAA,gBAAM,EAAC,qBAAqB,CAAC;;GACjB,kBAAkB,CA+H9B"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Language } from '@driveup/shared';
|
|
2
|
+
import { Activity, Content, Course } from '@driveup/common';
|
|
2
3
|
import { DrivingCategoryEntity } from '../../../system/driving/category.entity';
|
|
3
4
|
import { SeedCourseLessonEntity } from './lesson.entity';
|
|
4
|
-
import {
|
|
5
|
+
import { CountryProductEntity } from '../../product/country.entity';
|
|
5
6
|
import { TrackableEntity } from '../../../utils/trackable';
|
|
6
7
|
/**
|
|
7
8
|
* Represents a seed course template in the system.
|
|
@@ -41,7 +42,7 @@ export declare class SeedCourseEntity extends TrackableEntity<Course> {
|
|
|
41
42
|
/**
|
|
42
43
|
* Reference to the country product this course belongs to
|
|
43
44
|
*/
|
|
44
|
-
product: Promise<
|
|
45
|
+
product: Promise<CountryProductEntity>;
|
|
45
46
|
/**
|
|
46
47
|
* Optional reference to the driving category for driving-related courses
|
|
47
48
|
*/
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.SeedCourseEntity = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const nestjs_i18n_1 = require("nestjs-i18n");
|
|
15
|
+
const shared_1 = require("@driveup/shared");
|
|
15
16
|
const common_1 = require("@driveup/common");
|
|
16
17
|
const staff_entity_1 = require("../../../system/staff/staff.entity");
|
|
17
18
|
const category_entity_1 = require("../../../system/driving/category.entity");
|
|
@@ -47,7 +48,7 @@ let SeedCourseEntity = class SeedCourseEntity extends trackable_1.TrackableEntit
|
|
|
47
48
|
id: this.id,
|
|
48
49
|
title: transaltion?.title,
|
|
49
50
|
description: transaltion?.description,
|
|
50
|
-
imageUrl: transaltion?.
|
|
51
|
+
imageUrl: transaltion?.url || this.imageUrl,
|
|
51
52
|
maxStudents: this.maxStudents,
|
|
52
53
|
isFixed: this.isFixed
|
|
53
54
|
});
|
|
@@ -88,7 +89,7 @@ let SeedCourseEntity = class SeedCourseEntity extends trackable_1.TrackableEntit
|
|
|
88
89
|
title: translation?.title,
|
|
89
90
|
description: translation?.description,
|
|
90
91
|
content: translation?.content,
|
|
91
|
-
|
|
92
|
+
url: translation?.url,
|
|
92
93
|
link: translation?.link,
|
|
93
94
|
});
|
|
94
95
|
}
|
|
@@ -101,7 +102,7 @@ let SeedCourseEntity = class SeedCourseEntity extends trackable_1.TrackableEntit
|
|
|
101
102
|
title: t.title,
|
|
102
103
|
description: t.description,
|
|
103
104
|
content: t.content,
|
|
104
|
-
|
|
105
|
+
url: t.url,
|
|
105
106
|
link: t.link,
|
|
106
107
|
language: t.language
|
|
107
108
|
}));
|
|
@@ -112,10 +113,8 @@ let SeedCourseEntity = class SeedCourseEntity extends trackable_1.TrackableEntit
|
|
|
112
113
|
*/
|
|
113
114
|
async getActivities() {
|
|
114
115
|
const activities = [];
|
|
115
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy,
|
|
116
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.
|
|
117
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.updatedBy, common_1.ActivityType.updatedBy, staff_entity_1.StaffEntity));
|
|
118
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.updatedOn, common_1.ActivityType.updatedOn));
|
|
116
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy, this.createdOn, shared_1.ActivityType.created, staff_entity_1.StaffEntity));
|
|
117
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.updatedBy, this.updatedOn, shared_1.ActivityType.updated, staff_entity_1.StaffEntity));
|
|
119
118
|
return activities.filter(a => a);
|
|
120
119
|
}
|
|
121
120
|
};
|
|
@@ -161,7 +160,7 @@ __decorate([
|
|
|
161
160
|
__metadata("design:type", Boolean)
|
|
162
161
|
], SeedCourseEntity.prototype, "isFixed", void 0);
|
|
163
162
|
__decorate([
|
|
164
|
-
(0, typeorm_1.ManyToOne)(() => country_entity_1.
|
|
163
|
+
(0, typeorm_1.ManyToOne)(() => country_entity_1.CountryProductEntity, product => product.seedCourses),
|
|
165
164
|
__metadata("design:type", Promise)
|
|
166
165
|
], SeedCourseEntity.prototype, "product", void 0);
|
|
167
166
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"course.entity.js","sourceRoot":"","sources":["../../../../src/catalog/seed/courses/course.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA+D;AAC/D,6CAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"course.entity.js","sourceRoot":"","sources":["../../../../src/catalog/seed/courses/course.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA+D;AAC/D,6CAA0C;AAC1C,4CAAyD;AACzD,4CAA4D;AAC5D,qEAAiE;AACjE,6EAAgF;AAChF,mDAAyD;AACzD,iEAAoE;AACpE,wDAA2D;AAC3D,oEAA4D;AAE5D;;;;;;;GAOG;AAEI,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,2BAAuB;IA0E5D;;;OAGG;IACH,YAAY,KAAiC;QAC5C,KAAK,EAAE,CAAC;QACR,MAAM,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IAAI;KACb,CAAC;;sDACsB;AASxB;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;kDACe;AAUjB;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,CAAC;KACV,CAAC;;qDACkB;AAUpB;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,KAAK;KACd,CAAC;;iDACe;AAMjB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAoB,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC;;iDAC/B;AAMvC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAqB,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC;;kDAChC;AAMzC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,sCAAsB,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;;iDACtB;2BAxE/B,gBAAgB;IAD5B,IAAA,gBAAM,EAAC,aAAa,CAAC;;GACT,gBAAgB,CAyK5B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Language } from '@driveup/shared';
|
|
2
|
+
import { Activity, Content, Lesson, Picture } from '@driveup/common';
|
|
3
3
|
import { SeedCourseEntity } from './course.entity';
|
|
4
4
|
import { SeedCourseTopicEntity } from './topic.entity';
|
|
5
5
|
import { TrackableEntity } from '../../../utils/trackable';
|