@driveup/schema 0.2.7 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/catalog/addon/addon.entity.d.ts +2 -2
- package/lib/catalog/addon/addon.entity.js +2 -2
- package/lib/catalog/addon/addon.entity.js.map +1 -1
- package/lib/catalog/addon/country.entity.d.ts +2 -2
- package/lib/catalog/addon/country.entity.js +1 -2
- package/lib/catalog/addon/country.entity.js.map +1 -1
- package/lib/catalog/priceplan/priceplan.entity.d.ts +9 -4
- package/lib/catalog/priceplan/priceplan.entity.js +11 -4
- package/lib/catalog/priceplan/priceplan.entity.js.map +1 -1
- package/lib/catalog/product/country.entity.d.ts +12 -4
- package/lib/catalog/product/country.entity.js +19 -3
- package/lib/catalog/product/country.entity.js.map +1 -1
- package/lib/catalog/product/priceplan.entity.d.ts +6 -18
- package/lib/catalog/product/priceplan.entity.js +11 -33
- package/lib/catalog/product/priceplan.entity.js.map +1 -1
- package/lib/catalog/product/product.entity.d.ts +2 -2
- package/lib/catalog/product/product.entity.js +2 -2
- 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 +2 -2
- 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 +3 -4
- package/lib/catalog/seed/assets/asset.entity.js.map +1 -1
- package/lib/catalog/seed/courses/course.entity.d.ts +2 -2
- package/lib/catalog/seed/courses/course.entity.js +2 -2
- 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 +2 -2
- 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 +3 -3
- package/lib/catalog/seed/courses/topic.entity.js.map +1 -1
- package/lib/catalog/seed/expense/category.entity.d.ts +2 -2
- package/lib/catalog/seed/expense/category.entity.js +2 -2
- package/lib/catalog/seed/expense/category.entity.js.map +1 -1
- package/lib/index.d.ts +6 -1
- package/lib/index.js +7 -1
- package/lib/index.js.map +1 -1
- package/lib/profile/agent/agent.entity.d.ts +2 -1
- package/lib/profile/agent/agent.entity.js +17 -15
- package/lib/profile/agent/agent.entity.js.map +1 -1
- package/lib/profile/agent/asset.entity.d.ts +2 -2
- package/lib/profile/agent/asset.entity.js +1 -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 +2 -2
- package/lib/profile/agent/payout.entity.js.map +1 -1
- package/lib/profile/agent/promotion.entity.d.ts +3 -11
- package/lib/profile/agent/promotion.entity.js +3 -15
- package/lib/profile/agent/promotion.entity.js.map +1 -1
- package/lib/profile/company/company.entity.d.ts +43 -3
- package/lib/profile/company/company.entity.js +106 -33
- package/lib/profile/company/company.entity.js.map +1 -1
- package/lib/profile/company/course/appointment.entity.d.ts +271 -0
- package/lib/profile/company/course/appointment.entity.js +736 -0
- package/lib/profile/company/course/appointment.entity.js.map +1 -0
- package/lib/profile/company/course/course.entity.d.ts +8 -2
- package/lib/profile/company/course/course.entity.js +11 -4
- package/lib/profile/company/course/course.entity.js.map +1 -1
- package/lib/profile/company/course/lesson.entity.d.ts +10 -1
- package/lib/profile/company/course/lesson.entity.js +16 -2
- package/lib/profile/company/course/lesson.entity.js.map +1 -1
- package/lib/profile/company/course/schedule.entity.d.ts +8 -4
- package/lib/profile/company/course/schedule.entity.js +5 -0
- package/lib/profile/company/course/schedule.entity.js.map +1 -1
- package/lib/profile/company/course/topic.entity.d.ts +4 -3
- package/lib/profile/company/course/topic.entity.js +3 -3
- package/lib/profile/company/course/topic.entity.js.map +1 -1
- package/lib/profile/company/finances/billing/bill.entity.d.ts +8 -1
- package/lib/profile/company/finances/billing/bill.entity.js +35 -1
- package/lib/profile/company/finances/billing/bill.entity.js.map +1 -1
- package/lib/profile/company/finances/billing/item.entity.d.ts +15 -1
- package/lib/profile/company/finances/billing/item.entity.js +17 -1
- package/lib/profile/company/finances/billing/item.entity.js.map +1 -1
- package/lib/profile/company/finances/billing/transaction.entity.d.ts +5 -3
- package/lib/profile/company/finances/billing/transaction.entity.js +2 -2
- package/lib/profile/company/finances/billing/transaction.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 +8 -8
- package/lib/profile/company/finances/invoice/invoice.entity.js.map +1 -1
- package/lib/profile/company/finances/payment/method.entity.d.ts +16 -2
- package/lib/profile/company/finances/payment/method.entity.js +18 -2
- package/lib/profile/company/finances/payment/method.entity.js.map +1 -1
- package/lib/profile/company/instructor/instructor.entity.d.ts +29 -15
- package/lib/profile/company/instructor/instructor.entity.js +59 -20
- package/lib/profile/company/instructor/instructor.entity.js.map +1 -1
- package/lib/profile/company/medical/examination.entity.d.ts +2 -2
- package/lib/profile/company/medical/examination.entity.js +1 -1
- package/lib/profile/company/medical/examination.entity.js.map +1 -1
- package/lib/profile/company/medical/product.entity.d.ts +2 -3
- package/lib/profile/company/medical/product.entity.js +8 -9
- 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 +2 -3
- package/lib/profile/company/product/addon.entity.js.map +1 -1
- package/lib/profile/company/product/priceplan.entity.d.ts +14 -13
- package/lib/profile/company/product/priceplan.entity.js +14 -15
- package/lib/profile/company/product/priceplan.entity.js.map +1 -1
- package/lib/profile/company/product/product.entity.d.ts +29 -4
- package/lib/profile/company/product/product.entity.js +54 -6
- package/lib/profile/company/product/product.entity.js.map +1 -1
- package/lib/profile/instructor/instructor.entity.d.ts +2 -2
- package/lib/profile/instructor/instructor.entity.js +4 -3
- package/lib/profile/instructor/instructor.entity.js.map +1 -1
- package/lib/profile/student/program/licence/licence.entity.d.ts +10 -2
- package/lib/profile/student/program/licence/licence.entity.js +14 -3
- 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 +2 -2
- 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 +4 -4
- package/lib/profile/student/program/medical/examination.entity.js.map +1 -1
- package/lib/profile/student/program/program.entity.d.ts +4 -4
- package/lib/profile/student/program/program.entity.js +5 -10
- package/lib/profile/student/program/program.entity.js.map +1 -1
- package/lib/profile/student/program/training/appointment.entity.d.ts +21 -13
- package/lib/profile/student/program/training/appointment.entity.js +49 -23
- package/lib/profile/student/program/training/appointment.entity.js.map +1 -1
- package/lib/profile/student/program/training/exam.entity.d.ts +6 -1
- package/lib/profile/student/program/training/exam.entity.js +16 -8
- package/lib/profile/student/program/training/exam.entity.js.map +1 -1
- package/lib/profile/student/program/training/lesson.entity.d.ts +3 -3
- package/lib/profile/student/program/training/lesson.entity.js +4 -4
- package/lib/profile/student/program/training/lesson.entity.js.map +1 -1
- package/lib/profile/student/program/training/topic.entity.d.ts +6 -5
- package/lib/profile/student/program/training/topic.entity.js +9 -6
- package/lib/profile/student/program/training/topic.entity.js.map +1 -1
- package/lib/profile/student/program/training/training-balance.view.d.ts +4 -0
- package/lib/profile/student/program/training/training-balance.view.js +37 -0
- package/lib/profile/student/program/training/training-balance.view.js.map +1 -0
- package/lib/profile/student/program/training/training-cost.view.d.ts +4 -0
- package/lib/profile/student/program/training/training-cost.view.js +45 -0
- package/lib/profile/student/program/training/training-cost.view.js.map +1 -0
- package/lib/profile/student/program/training/training-sessions.view.d.ts +8 -0
- package/lib/profile/student/program/training/training-sessions.view.js +50 -0
- package/lib/profile/student/program/training/training-sessions.view.js.map +1 -0
- package/lib/profile/student/program/training/training.entity.d.ts +4 -1
- package/lib/profile/student/program/training/training.entity.js +43 -36
- 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 +3 -3
- package/lib/profile/student/program/training/transaction.entity.js.map +1 -1
- package/lib/profile/student/student.entity.d.ts +2 -2
- package/lib/profile/student/student.entity.js +5 -4
- package/lib/profile/student/student.entity.js.map +1 -1
- package/lib/public/faq.d.ts +25 -0
- package/lib/public/faq.js +60 -0
- package/lib/public/faq.js.map +1 -0
- package/lib/public/feature-item.d.ts +54 -0
- package/lib/public/feature-item.js +78 -0
- package/lib/public/feature-item.js.map +1 -0
- package/lib/public/feature.d.ts +46 -0
- package/lib/public/feature.js +76 -0
- package/lib/public/feature.js.map +1 -0
- package/lib/public/learning-hub.d.ts +30 -0
- package/lib/public/learning-hub.js +77 -0
- package/lib/public/learning-hub.js.map +1 -0
- package/lib/public/testimonial.d.ts +40 -0
- package/lib/public/testimonial.js +85 -0
- package/lib/public/testimonial.js.map +1 -0
- package/lib/system/campaign/campaign.entity.d.ts +3 -3
- package/lib/system/campaign/campaign.entity.js +4 -4
- 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 +3 -3
- 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 +11 -6
- package/lib/system/country/country.entity.js.map +1 -1
- package/lib/system/driving/category.entity.d.ts +2 -2
- package/lib/system/driving/category.entity.js +2 -2
- package/lib/system/driving/category.entity.js.map +1 -1
- package/lib/system/ical/ical.entity.d.ts +63 -0
- package/lib/system/ical/ical.entity.js +70 -0
- package/lib/system/ical/ical.entity.js.map +1 -0
- package/lib/system/policy/policy.entity.d.ts +2 -2
- package/lib/system/policy/policy.entity.js +3 -3
- package/lib/system/policy/policy.entity.js.map +1 -1
- package/lib/system/staff/staff.entity.d.ts +2 -2
- package/lib/system/staff/staff.entity.js +3 -2
- package/lib/system/staff/staff.entity.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/user/alert.entity.d.ts +2 -2
- package/lib/user/alert.entity.js.map +1 -1
- package/lib/user/device.entity.d.ts +2 -2
- package/lib/user/device.entity.js +3 -3
- 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 +2 -2
- package/lib/user/ticket.entity.js +6 -4
- package/lib/user/ticket.entity.js.map +1 -1
- package/lib/user/user.entity.d.ts +14 -11
- package/lib/user/user.entity.js +20 -16
- package/lib/user/user.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 +12 -1
- package/lib/utils/trackable.js +55 -0
- package/lib/utils/trackable.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Activity, Addon
|
|
2
|
-
import { AddonType, ColorContext, Language, ProductType } from '@driveup/shared';
|
|
1
|
+
import { Activity, Addon } from '@driveup/common';
|
|
2
|
+
import { AddonType, ColorContext, Content, Language, ProductType } from '@driveup/shared';
|
|
3
3
|
import { TrackableEntity } from '../../utils/trackable';
|
|
4
4
|
import { ProductEntity } from '../product/product.entity';
|
|
5
5
|
import { AddonCountryEntity } from './country.entity';
|
|
@@ -69,7 +69,7 @@ let AddonEntity = class AddonEntity extends trackable_1.TrackableEntity {
|
|
|
69
69
|
getTranslation(lang) {
|
|
70
70
|
const language = lang || nestjs_i18n_1.I18nContext.current()?.lang;
|
|
71
71
|
const translation = this.translations?.find(t => t.language === language);
|
|
72
|
-
return new
|
|
72
|
+
return new shared_1.Content({
|
|
73
73
|
title: translation?.title,
|
|
74
74
|
description: translation?.description,
|
|
75
75
|
content: translation?.content,
|
|
@@ -82,7 +82,7 @@ let AddonEntity = class AddonEntity extends trackable_1.TrackableEntity {
|
|
|
82
82
|
* @returns Array of Content objects for all languages
|
|
83
83
|
*/
|
|
84
84
|
getTranslations() {
|
|
85
|
-
return this.translations?.map(t => new
|
|
85
|
+
return this.translations?.map(t => new shared_1.Content({
|
|
86
86
|
title: t.title,
|
|
87
87
|
description: t.description,
|
|
88
88
|
content: t.content,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addon.entity.js","sourceRoot":"","sources":["../../../src/catalog/addon/addon.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"addon.entity.js","sourceRoot":"","sources":["../../../src/catalog/addon/addon.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAkD;AAClD,4CAAwG;AACxG,6CAA0C;AAC1C,qCAAoD;AAEpD,kEAA8D;AAC9D,iEAAyD;AACzD,qDAAwD;AACxD,8DAA0D;AAC1D,qDAAsD;AAEtD;;;;;;GAMG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,2BAAsB;IA+GtD;;;OAGG;IACH,YAAY,KAA4B;QACvC,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,cAAK,CAAC;YAChB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,WAAW,CAAC,KAAK;YACxB,WAAW,EAAE,WAAW,CAAC,WAAW;YACpC,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ;YAC3C,MAAM,EAAE,IAAI,CAAC,MAA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AAW;IADvB,IAAA,gBAAM,EAAC,cAAc,CAAC;;GACV,WAAW,CA4MvB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Activity, Addon
|
|
2
|
-
import { Language } from '@driveup/shared';
|
|
1
|
+
import { Activity, Addon } from '@driveup/common';
|
|
2
|
+
import { Language, Metadata } from '@driveup/shared';
|
|
3
3
|
import { CompanyAddonEntity } from '../../profile/company/product/addon.entity';
|
|
4
4
|
import { CountryEntity } from '../../system/country/country.entity';
|
|
5
5
|
import { TrackableEntity } from '../../utils/trackable';
|
|
@@ -10,7 +10,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AddonCountryEntity = void 0;
|
|
13
|
-
const common_1 = require("@driveup/common");
|
|
14
13
|
const shared_1 = require("@driveup/shared");
|
|
15
14
|
const typeorm_1 = require("typeorm");
|
|
16
15
|
const addon_entity_1 = require("../../profile/company/product/addon.entity");
|
|
@@ -65,7 +64,7 @@ let AddonCountryEntity = class AddonCountryEntity extends trackable_1.TrackableE
|
|
|
65
64
|
* @returns Array of Metadata objects
|
|
66
65
|
*/
|
|
67
66
|
getMetadata() {
|
|
68
|
-
return this.metadata?.map(m =>
|
|
67
|
+
return this.metadata?.map(m => shared_1.Metadata.toInstance(m));
|
|
69
68
|
}
|
|
70
69
|
/**
|
|
71
70
|
* Retrieves all activity records for this addon-country configuration
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"country.entity.js","sourceRoot":"","sources":["../../../src/catalog/addon/country.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"country.entity.js","sourceRoot":"","sources":["../../../src/catalog/addon/country.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,4CAAmE;AACnE,qCAA+D;AAE/D,6EAAgF;AAChF,wEAAoE;AACpE,kEAA8D;AAC9D,iEAAyD;AACzD,q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'@driveup/shared';
|
|
3
|
-
import { TrackableEntity } from '../../utils/trackable';
|
|
1
|
+
import { Activity, Item, PricePlan } from '@driveup/common';
|
|
2
|
+
import { Content, Language, Metadata, PricePlanFeature, PricePlanType, PricePlanUsage } from '@driveup/shared';
|
|
4
3
|
import { ProductPricePlanEntity } from '../product/priceplan.entity';
|
|
4
|
+
import { TrackableEntity } from '../../utils/trackable';
|
|
5
5
|
/**
|
|
6
6
|
* Represents a pricing plan template in the system.
|
|
7
7
|
* Price plans define different payment structures and feature sets for products.
|
|
@@ -29,7 +29,7 @@ export declare class PricePlanEntity extends TrackableEntity<PricePlan> {
|
|
|
29
29
|
* Plan feature usage details
|
|
30
30
|
* Use this definition to build company driving plang usage field (IPricePlanUsage)
|
|
31
31
|
*/
|
|
32
|
-
usage:
|
|
32
|
+
usage: PricePlanUsage[];
|
|
33
33
|
/**
|
|
34
34
|
* Country localizations
|
|
35
35
|
*/
|
|
@@ -49,6 +49,11 @@ export declare class PricePlanEntity extends TrackableEntity<PricePlan> {
|
|
|
49
49
|
* Deactivating must set all country price plans to enabled=false
|
|
50
50
|
*/
|
|
51
51
|
active: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* For Enterprise plan only
|
|
54
|
+
* The minimum number of users for this plan
|
|
55
|
+
*/
|
|
56
|
+
minUsers: number;
|
|
52
57
|
/**
|
|
53
58
|
* ID of the staff member who enabled this price plan
|
|
54
59
|
*/
|
|
@@ -16,8 +16,8 @@ const nestjs_i18n_1 = require("nestjs-i18n");
|
|
|
16
16
|
const typeorm_1 = require("typeorm");
|
|
17
17
|
const staff_entity_1 = require("../../system/staff/staff.entity");
|
|
18
18
|
const activity_helper_1 = require("../../utils/activity.helper");
|
|
19
|
-
const trackable_1 = require("../../utils/trackable");
|
|
20
19
|
const priceplan_entity_1 = require("../product/priceplan.entity");
|
|
20
|
+
const trackable_1 = require("../../utils/trackable");
|
|
21
21
|
/**
|
|
22
22
|
* Represents a pricing plan template in the system.
|
|
23
23
|
* Price plans define different payment structures and feature sets for products.
|
|
@@ -70,7 +70,7 @@ let PricePlanEntity = class PricePlanEntity extends trackable_1.TrackableEntity
|
|
|
70
70
|
getTranslation(lang) {
|
|
71
71
|
const language = lang || nestjs_i18n_1.I18nContext.current()?.lang;
|
|
72
72
|
const translation = this.translations?.find(t => t.language === language);
|
|
73
|
-
return new
|
|
73
|
+
return new shared_1.Content({
|
|
74
74
|
title: translation?.title,
|
|
75
75
|
description: translation?.description,
|
|
76
76
|
content: translation?.content,
|
|
@@ -83,7 +83,7 @@ let PricePlanEntity = class PricePlanEntity extends trackable_1.TrackableEntity
|
|
|
83
83
|
* @returns Array of Content instances for all languages
|
|
84
84
|
*/
|
|
85
85
|
getTranslations() {
|
|
86
|
-
return this.translations?.map(t => new
|
|
86
|
+
return this.translations?.map(t => new shared_1.Content({
|
|
87
87
|
title: t.title,
|
|
88
88
|
description: t.description,
|
|
89
89
|
content: t.content,
|
|
@@ -122,7 +122,7 @@ let PricePlanEntity = class PricePlanEntity extends trackable_1.TrackableEntity
|
|
|
122
122
|
* @returns Array of Metadata instances
|
|
123
123
|
*/
|
|
124
124
|
getMetadata() {
|
|
125
|
-
return this.metadata?.map(m =>
|
|
125
|
+
return this.metadata?.map(m => shared_1.Metadata.toInstance(m));
|
|
126
126
|
}
|
|
127
127
|
/**
|
|
128
128
|
* Retrieves activity history for this price plan
|
|
@@ -199,6 +199,13 @@ __decorate([
|
|
|
199
199
|
}),
|
|
200
200
|
__metadata("design:type", Boolean)
|
|
201
201
|
], PricePlanEntity.prototype, "active", void 0);
|
|
202
|
+
__decorate([
|
|
203
|
+
(0, typeorm_1.Column)({
|
|
204
|
+
nullable: true,
|
|
205
|
+
default: null
|
|
206
|
+
}),
|
|
207
|
+
__metadata("design:type", Number)
|
|
208
|
+
], PricePlanEntity.prototype, "minUsers", void 0);
|
|
202
209
|
__decorate([
|
|
203
210
|
(0, typeorm_1.Column)({ nullable: true, default: null }),
|
|
204
211
|
__metadata("design:type", Number)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceplan.entity.js","sourceRoot":"","sources":["../../../src/catalog/priceplan/priceplan.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"priceplan.entity.js","sourceRoot":"","sources":["../../../src/catalog/priceplan/priceplan.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA4D;AAC5D,4CAA6H;AAC7H,6CAA0C;AAC1C,qCAAoD;AAEpD,kEAA8D;AAC9D,iEAAyD;AACzD,kEAAqE;AACrE,qDAAwD;AAExD;;;;;;;GAOG;AAEI,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,2BAA0B;IAgI9D;;;OAGG;IACH,YAAY,KAAgC;QAC3C,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,kBAAS,CAAC;YACpB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,WAAW,EAAE,KAAK;YACzB,WAAW,EAAE,WAAW,EAAE,WAAW;YACrC,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE;YAC5B,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE;YAC5B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;SACnB,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,Q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QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BAC9B,IAAI;mDAAC;AAOjB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,yCAAsB,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;;iDACpB;0BA9HhC,eAAe;IAD3B,IAAA,gBAAM,EAAC,kBAAkB,CAAC;;GACd,eAAe,CAmP3B"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Activity,
|
|
2
|
-
import { Language } from '@driveup/shared';
|
|
1
|
+
import { Activity, Product } from '@driveup/common';
|
|
2
|
+
import { Language, Metadata } from '@driveup/shared';
|
|
3
3
|
import { CompanyProductEntity } from '../../profile/company/product/product.entity';
|
|
4
4
|
import { CountryEntity } from '../../system/country/country.entity';
|
|
5
|
-
import { TrackableEntity } from '../../utils/trackable';
|
|
6
5
|
import { SeedCourseEntity } from '../seed/courses/course.entity';
|
|
6
|
+
import { TrackableEntity } from '../../utils/trackable';
|
|
7
7
|
import { ProductPricePlanEntity } from './priceplan.entity';
|
|
8
8
|
import { ProductEntity } from './product.entity';
|
|
9
9
|
/**
|
|
@@ -24,6 +24,14 @@ export declare class CountryProductEntity extends TrackableEntity<Product> {
|
|
|
24
24
|
* Country reference
|
|
25
25
|
*/
|
|
26
26
|
countryId: number;
|
|
27
|
+
/**
|
|
28
|
+
* Country based product start credit
|
|
29
|
+
*/
|
|
30
|
+
startCredit: number;
|
|
31
|
+
/**
|
|
32
|
+
* Number of free benefits included with this price plan
|
|
33
|
+
*/
|
|
34
|
+
freeBenefits: number;
|
|
27
35
|
/**
|
|
28
36
|
* Country dependent product vat
|
|
29
37
|
*/
|
|
@@ -106,7 +114,7 @@ export declare class CountryProductEntity extends TrackableEntity<Product> {
|
|
|
106
114
|
* @param lang - Optional language code; defaults to current i18n context
|
|
107
115
|
* @returns Content instance with translated title and description
|
|
108
116
|
*/
|
|
109
|
-
getTranslation(lang?: Language): Promise<import("@driveup/
|
|
117
|
+
getTranslation(lang?: Language): Promise<import("@driveup/shared").Content>;
|
|
110
118
|
/**
|
|
111
119
|
* Retrieves activity history for this country product
|
|
112
120
|
* @returns Promise resolving to array of Activity instances tracking creation, updates, and status changes
|
|
@@ -10,15 +10,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CountryProductEntity = void 0;
|
|
13
|
-
const common_1 = require("@driveup/common");
|
|
14
13
|
const shared_1 = require("@driveup/shared");
|
|
15
14
|
const typeorm_1 = require("typeorm");
|
|
16
15
|
const product_entity_1 = require("../../profile/company/product/product.entity");
|
|
17
16
|
const country_entity_1 = require("../../system/country/country.entity");
|
|
18
17
|
const staff_entity_1 = require("../../system/staff/staff.entity");
|
|
18
|
+
const course_entity_1 = require("../seed/courses/course.entity");
|
|
19
19
|
const activity_helper_1 = require("../../utils/activity.helper");
|
|
20
20
|
const trackable_1 = require("../../utils/trackable");
|
|
21
|
-
const course_entity_1 = require("../seed/courses/course.entity");
|
|
22
21
|
const priceplan_entity_1 = require("./priceplan.entity");
|
|
23
22
|
const product_entity_2 = require("./product.entity");
|
|
24
23
|
/**
|
|
@@ -66,7 +65,7 @@ let CountryProductEntity = class CountryProductEntity extends trackable_1.Tracka
|
|
|
66
65
|
* @returns Array of Metadata instances
|
|
67
66
|
*/
|
|
68
67
|
getMetadata() {
|
|
69
|
-
return this.metadata?.map(m =>
|
|
68
|
+
return this.metadata?.map(m => shared_1.Metadata.toInstance(m));
|
|
70
69
|
}
|
|
71
70
|
/**
|
|
72
71
|
* Gets the localized translation for the product
|
|
@@ -99,6 +98,23 @@ __decorate([
|
|
|
99
98
|
(0, typeorm_1.Column)(),
|
|
100
99
|
__metadata("design:type", Number)
|
|
101
100
|
], CountryProductEntity.prototype, "countryId", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, typeorm_1.Column)({
|
|
103
|
+
type: 'decimal',
|
|
104
|
+
precision: 8,
|
|
105
|
+
scale: 2,
|
|
106
|
+
nullable: false,
|
|
107
|
+
default: 0
|
|
108
|
+
}),
|
|
109
|
+
__metadata("design:type", Number)
|
|
110
|
+
], CountryProductEntity.prototype, "startCredit", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, typeorm_1.Column)({
|
|
113
|
+
nullable: true,
|
|
114
|
+
default: null
|
|
115
|
+
}),
|
|
116
|
+
__metadata("design:type", Number)
|
|
117
|
+
], CountryProductEntity.prototype, "freeBenefits", void 0);
|
|
102
118
|
__decorate([
|
|
103
119
|
(0, typeorm_1.Column)({
|
|
104
120
|
type: 'decimal',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"country.entity.js","sourceRoot":"","sources":["../../../src/catalog/product/country.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"country.entity.js","sourceRoot":"","sources":["../../../src/catalog/product/country.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,4CAAkF;AAClF,qCAA+D;AAE/D,iFAAoF;AACpF,wEAAoE;AACpE,kEAA8D;AAC9D,iEAAiE;AACjE,iEAAyD;AACzD,qDAAwD;AACxD,yDAA4D;AAC5D,qDAAiD;AAEjD;;;;;;;GAOG;AAEI,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,2BAAwB;IAqIjE;;;OAGG;IACH,YAAY,KAAqC;QAChD,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,OAAO,CAAC,IAAe;QAC5B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC;QAClC,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACrC,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QACrB,O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AAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BAC/B,IAAI;uDAAC;AAMhB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;wDACvB;AAMnB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BAC9B,IAAI;wDAAC;AAMjB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8BAAa,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC;;qDAC7B;AAMhC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8BAAa,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;;qDAC5B;AAMhC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,yCAAsB,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;;wDAChB;AAM9C;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAoB,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;;uDACvB;AAM3C;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,gCAAgB,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC;;yDACnB;+BAnI7B,oBAAoB;IADhC,IAAA,gBAAM,EAAC,uBAAuB,CAAC;;GACnB,oBAAoB,CAqMhC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Activity,
|
|
2
|
-
import { Language } from '@driveup/shared';
|
|
1
|
+
import { Activity, PricePlan } from '@driveup/common';
|
|
2
|
+
import { Language, PricePlanType } from '@driveup/shared';
|
|
3
3
|
import { CompanyProductPricePlanEntity } from '../../profile/company/product/priceplan.entity';
|
|
4
|
-
import { TrackableEntity } from '../../utils/trackable';
|
|
5
4
|
import { PricePlanEntity } from '../priceplan/priceplan.entity';
|
|
5
|
+
import { TrackableEntity } from '../../utils/trackable';
|
|
6
6
|
import { CountryProductEntity } from './country.entity';
|
|
7
7
|
/**
|
|
8
8
|
* Represents a price plan configuration for a specific country product.
|
|
@@ -27,14 +27,6 @@ export declare class ProductPricePlanEntity extends TrackableEntity<PricePlan> {
|
|
|
27
27
|
* Country based product price
|
|
28
28
|
*/
|
|
29
29
|
price: number;
|
|
30
|
-
/**
|
|
31
|
-
* Country based product start credit
|
|
32
|
-
*/
|
|
33
|
-
startCredit: number;
|
|
34
|
-
/**
|
|
35
|
-
* Number of free benefits included with this price plan
|
|
36
|
-
*/
|
|
37
|
-
freeBenefits: number;
|
|
38
30
|
/**
|
|
39
31
|
* Featured badge or label for marketing purposes
|
|
40
32
|
*/
|
|
@@ -47,9 +39,9 @@ export declare class ProductPricePlanEntity extends TrackableEntity<PricePlan> {
|
|
|
47
39
|
*/
|
|
48
40
|
active: boolean;
|
|
49
41
|
/**
|
|
50
|
-
*
|
|
42
|
+
* Indicates if this is the default price plan for the country productt
|
|
51
43
|
*/
|
|
52
|
-
|
|
44
|
+
default: boolean;
|
|
53
45
|
/**
|
|
54
46
|
* ID of the staff member who enabled this price plan for the product
|
|
55
47
|
*/
|
|
@@ -101,11 +93,7 @@ export declare class ProductPricePlanEntity extends TrackableEntity<PricePlan> {
|
|
|
101
93
|
* @returns Promise resolving to the Product model
|
|
102
94
|
*/
|
|
103
95
|
toProduct(lang?: Language): Promise<import("@driveup/common").Product>;
|
|
104
|
-
|
|
105
|
-
* Gets the metadata as Metadata instances
|
|
106
|
-
* @returns Array of Metadata instances
|
|
107
|
-
*/
|
|
108
|
-
getMetadata(): Metadata<any>[];
|
|
96
|
+
getPricePlanType(): Promise<PricePlanType>;
|
|
109
97
|
/**
|
|
110
98
|
* Retrieves activity history for this price plan
|
|
111
99
|
* @returns Promise resolving to array of Activity instances tracking creation, updates, and status changes
|
|
@@ -10,14 +10,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ProductPricePlanEntity = void 0;
|
|
13
|
-
const common_1 = require("@driveup/common");
|
|
14
13
|
const shared_1 = require("@driveup/shared");
|
|
15
14
|
const typeorm_1 = require("typeorm");
|
|
16
15
|
const priceplan_entity_1 = require("../../profile/company/product/priceplan.entity");
|
|
17
16
|
const staff_entity_1 = require("../../system/staff/staff.entity");
|
|
17
|
+
const priceplan_entity_2 = require("../priceplan/priceplan.entity");
|
|
18
18
|
const activity_helper_1 = require("../../utils/activity.helper");
|
|
19
19
|
const trackable_1 = require("../../utils/trackable");
|
|
20
|
-
const priceplan_entity_2 = require("../priceplan/priceplan.entity");
|
|
21
20
|
const country_entity_1 = require("./country.entity");
|
|
22
21
|
/**
|
|
23
22
|
* Represents a price plan configuration for a specific country product.
|
|
@@ -43,14 +42,14 @@ let ProductPricePlanEntity = class ProductPricePlanEntity extends trackable_1.Tr
|
|
|
43
42
|
*/
|
|
44
43
|
async toModel(lang) {
|
|
45
44
|
const entity = await this.pricePlan;
|
|
45
|
+
const product = await this.product;
|
|
46
46
|
const priceplan = entity.toModel(lang);
|
|
47
47
|
priceplan.id = this.id;
|
|
48
48
|
priceplan.price = this.price;
|
|
49
|
-
priceplan.startCredit =
|
|
50
|
-
priceplan.freeBenefits =
|
|
49
|
+
priceplan.startCredit = product.startCredit;
|
|
50
|
+
priceplan.freeBenefits = product.freeBenefits;
|
|
51
51
|
priceplan.featured = this.featured;
|
|
52
52
|
priceplan.active = this.active;
|
|
53
|
-
priceplan.metadata = this.getMetadata();
|
|
54
53
|
return priceplan;
|
|
55
54
|
}
|
|
56
55
|
/**
|
|
@@ -70,12 +69,9 @@ let ProductPricePlanEntity = class ProductPricePlanEntity extends trackable_1.Tr
|
|
|
70
69
|
const product = await this.product;
|
|
71
70
|
return product.toModel(lang);
|
|
72
71
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
*/
|
|
77
|
-
getMetadata() {
|
|
78
|
-
return this.metadata?.map(m => common_1.Metadata.toInstance(m));
|
|
72
|
+
async getPricePlanType() {
|
|
73
|
+
const systemPricePlan = await this.pricePlan;
|
|
74
|
+
return systemPricePlan.type;
|
|
79
75
|
}
|
|
80
76
|
/**
|
|
81
77
|
* Retrieves activity history for this price plan
|
|
@@ -109,23 +105,6 @@ __decorate([
|
|
|
109
105
|
}),
|
|
110
106
|
__metadata("design:type", Number)
|
|
111
107
|
], ProductPricePlanEntity.prototype, "price", void 0);
|
|
112
|
-
__decorate([
|
|
113
|
-
(0, typeorm_1.Column)({
|
|
114
|
-
type: 'decimal',
|
|
115
|
-
precision: 8,
|
|
116
|
-
scale: 2,
|
|
117
|
-
nullable: false,
|
|
118
|
-
default: 0
|
|
119
|
-
}),
|
|
120
|
-
__metadata("design:type", Number)
|
|
121
|
-
], ProductPricePlanEntity.prototype, "startCredit", void 0);
|
|
122
|
-
__decorate([
|
|
123
|
-
(0, typeorm_1.Column)({
|
|
124
|
-
nullable: true,
|
|
125
|
-
default: null
|
|
126
|
-
}),
|
|
127
|
-
__metadata("design:type", Number)
|
|
128
|
-
], ProductPricePlanEntity.prototype, "freeBenefits", void 0);
|
|
129
108
|
__decorate([
|
|
130
109
|
(0, typeorm_1.Column)({
|
|
131
110
|
nullable: true,
|
|
@@ -142,12 +121,11 @@ __decorate([
|
|
|
142
121
|
], ProductPricePlanEntity.prototype, "active", void 0);
|
|
143
122
|
__decorate([
|
|
144
123
|
(0, typeorm_1.Column)({
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
default: null
|
|
124
|
+
nullable: false,
|
|
125
|
+
default: false
|
|
148
126
|
}),
|
|
149
|
-
__metadata("design:type",
|
|
150
|
-
], ProductPricePlanEntity.prototype, "
|
|
127
|
+
__metadata("design:type", Boolean)
|
|
128
|
+
], ProductPricePlanEntity.prototype, "default", void 0);
|
|
151
129
|
__decorate([
|
|
152
130
|
(0, typeorm_1.Column)({ nullable: true, default: null }),
|
|
153
131
|
__metadata("design:type", Number)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceplan.entity.js","sourceRoot":"","sources":["../../../src/catalog/product/priceplan.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"priceplan.entity.js","sourceRoot":"","sources":["../../../src/catalog/product/priceplan.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,4CAAkF;AAClF,qCAA+D;AAE/D,qFAA+F;AAC/F,kEAA8D;AAC9D,oEAAgE;AAChE,iEAAyD;AACzD,qDAAwD;AACxD,qDAAwD;AAExD;;;;;;;GAOG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,2BAA0B;IAoGrE;;;OAGG;IACH,YAAY,KAAuC;QAClD,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,OAAO,CAAC,IAAe;QAC5B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC;QACpC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC;QACnC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACvC,SAAS,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QACvB,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAC7B,SAAS,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QAC5C,SAAS,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QAC9C,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QACnC,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC/B,OAAO,SAAS,CAAC;IAClB,C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S,EAAC,GAAG,EAAE,CAAC,gDAA6B,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;;yDACnB;iCAlGxC,sBAAsB;IADlC,IAAA,gBAAM,EAAC,yBAAyB,CAAC;;GACrB,sBAAsB,CAmKlC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Activity,
|
|
2
|
-
import { AppointmentType, CatalogType, ColorContext, Language, ProductType } from '@driveup/shared';
|
|
1
|
+
import { Activity, Product } from '@driveup/common';
|
|
2
|
+
import { AppointmentType, CatalogType, ColorContext, Content, Language, ProductType } from '@driveup/shared';
|
|
3
3
|
import { TrackableEntity } from '../../utils/trackable';
|
|
4
4
|
import { CountryProductEntity } from './country.entity';
|
|
5
5
|
/**
|
|
@@ -69,7 +69,7 @@ let ProductEntity = class ProductEntity extends trackable_1.TrackableEntity {
|
|
|
69
69
|
getTranslation(lang) {
|
|
70
70
|
const language = lang || nestjs_i18n_1.I18nContext.current()?.lang;
|
|
71
71
|
const translation = this.translations?.find(t => t.language === language);
|
|
72
|
-
return new
|
|
72
|
+
return new shared_1.Content({
|
|
73
73
|
title: translation?.title,
|
|
74
74
|
description: translation?.description,
|
|
75
75
|
content: translation?.content,
|
|
@@ -82,7 +82,7 @@ let ProductEntity = class ProductEntity extends trackable_1.TrackableEntity {
|
|
|
82
82
|
* @returns Array of Content instances for all languages
|
|
83
83
|
*/
|
|
84
84
|
getTranslations() {
|
|
85
|
-
return this.translations?.map(t => new
|
|
85
|
+
return this.translations?.map(t => new shared_1.Content({
|
|
86
86
|
title: t.title,
|
|
87
87
|
description: t.description,
|
|
88
88
|
content: t.content,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.entity.js","sourceRoot":"","sources":["../../../src/catalog/product/product.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"product.entity.js","sourceRoot":"","sources":["../../../src/catalog/product/product.entity.ts"],"names":[],"mapp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,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;+CACe;AAUjB;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;mDACsB;AASxB;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;6CACV;AAShB;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,CAAC;KACV,CAAC;;2CACW;AAMb;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;gDACxB;AAMlB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BAC/B,IAAI;gDAAC;AAMhB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;iDACvB;AAMnB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BAC9B,IAAI;iDAAC;AAMjB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAoB,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;;gDACvB;wBA3G/B,aAAa;IADzB,IAAA,gBAAM,EAAC,gBAAgB,CAAC;;GACZ,aAAa,CAsNzB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Activity,
|
|
2
|
-
import { Language, ProductType, ProgramType } from '@driveup/shared';
|
|
1
|
+
import { Activity, Program } from '@driveup/common';
|
|
2
|
+
import { Content, Language, ProductType, ProgramType } from '@driveup/shared';
|
|
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';
|
|
@@ -68,7 +68,7 @@ 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 shared_1.Content({
|
|
72
72
|
title: translation?.title,
|
|
73
73
|
description: translation?.description,
|
|
74
74
|
content: translation?.content,
|
|
@@ -81,7 +81,7 @@ 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 shared_1.Content({
|
|
85
85
|
title: t.title,
|
|
86
86
|
description: t.description,
|
|
87
87
|
content: t.content,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.entity.js","sourceRoot":"","sources":["../../../src/catalog/program/program.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"program.entity.js","sourceRoot":"","sources":["../../../src/catalog/program/program.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAoD;AACpD,4CAA4F;AAC5F,6CAA0C;AAC1C,qCAAgE;AAEhE,iFAAoF;AACpF,0EAA6E;AAC7E,kEAA8D;AAC9D,iEAAyD;AACzD,qDAAwD;AAExD;;;;;;;GAOG;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,KAAK,CAAC,OAAO,CAAC,IAAe;QAC5B,MAAM,WAAW,GAA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DACjB;wBA3GrC,aAAa;IADzB,IAAA,gBAAM,EAAC,gBAAgB,CAAC;;GACZ,aAAa,CA4LzB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Activity
|
|
2
|
-
import { AssetScope, AssetType, Language } from '@driveup/shared';
|
|
1
|
+
import { Activity } from '@driveup/common';
|
|
2
|
+
import { Asset, AssetScope, AssetType, Content, Language } from '@driveup/shared';
|
|
3
3
|
import { TrackableEntity } from '../../../utils/trackable';
|
|
4
4
|
/**
|
|
5
5
|
* Represents a catalog asset (image, video, document) for promotional or educational purposes.
|
|
@@ -10,7 +10,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CatalogAssetEntity = void 0;
|
|
13
|
-
const common_1 = require("@driveup/common");
|
|
14
13
|
const shared_1 = require("@driveup/shared");
|
|
15
14
|
const nestjs_i18n_1 = require("nestjs-i18n");
|
|
16
15
|
const typeorm_1 = require("typeorm");
|
|
@@ -40,7 +39,7 @@ let CatalogAssetEntity = class CatalogAssetEntity extends trackable_1.TrackableE
|
|
|
40
39
|
*/
|
|
41
40
|
toModel(lang) {
|
|
42
41
|
const transaltion = this.getTranslation(lang);
|
|
43
|
-
return new
|
|
42
|
+
return new shared_1.Asset({
|
|
44
43
|
scope: this.scope,
|
|
45
44
|
type: this.type,
|
|
46
45
|
url: this.url,
|
|
@@ -64,7 +63,7 @@ let CatalogAssetEntity = class CatalogAssetEntity extends trackable_1.TrackableE
|
|
|
64
63
|
getTranslation(lang) {
|
|
65
64
|
const language = lang || nestjs_i18n_1.I18nContext.current()?.lang;
|
|
66
65
|
const translation = this.translations?.find(t => t.language === language);
|
|
67
|
-
return new
|
|
66
|
+
return new shared_1.Content({
|
|
68
67
|
title: translation?.title,
|
|
69
68
|
description: translation?.description,
|
|
70
69
|
content: translation?.content,
|
|
@@ -76,7 +75,7 @@ let CatalogAssetEntity = class CatalogAssetEntity extends trackable_1.TrackableE
|
|
|
76
75
|
* @returns Array of Content instances for all languages
|
|
77
76
|
*/
|
|
78
77
|
getTranslations() {
|
|
79
|
-
return this.translations?.map(t => new
|
|
78
|
+
return this.translations?.map(t => new shared_1.Content({
|
|
80
79
|
title: t.title,
|
|
81
80
|
description: t.description,
|
|
82
81
|
content: t.content,
|