@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
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PublicLearningHubItemEntity = void 0;
|
|
13
|
+
const shared_1 = require("@driveup/shared");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
// TODO: come up with better name (publicLearningResource?)
|
|
16
|
+
let PublicLearningHubItemEntity = class PublicLearningHubItemEntity {
|
|
17
|
+
/************************* Methods *************************/
|
|
18
|
+
constructor(props) {
|
|
19
|
+
Object.assign(this, props);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.PublicLearningHubItemEntity = PublicLearningHubItemEntity;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], PublicLearningHubItemEntity.prototype, "id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({
|
|
29
|
+
type: 'enum',
|
|
30
|
+
enum: shared_1.Language,
|
|
31
|
+
default: shared_1.Language.En,
|
|
32
|
+
nullable: false
|
|
33
|
+
}),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], PublicLearningHubItemEntity.prototype, "language", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({
|
|
38
|
+
type: 'enum',
|
|
39
|
+
enum: shared_1.ProfileType,
|
|
40
|
+
default: shared_1.ProfileType.Company,
|
|
41
|
+
nullable: false
|
|
42
|
+
}),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], PublicLearningHubItemEntity.prototype, "profile", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({
|
|
47
|
+
nullable: true,
|
|
48
|
+
default: null
|
|
49
|
+
}),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], PublicLearningHubItemEntity.prototype, "title", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({
|
|
54
|
+
nullable: true,
|
|
55
|
+
default: null
|
|
56
|
+
}),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], PublicLearningHubItemEntity.prototype, "description", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({
|
|
61
|
+
nullable: false,
|
|
62
|
+
default: 0
|
|
63
|
+
}),
|
|
64
|
+
__metadata("design:type", Number)
|
|
65
|
+
], PublicLearningHubItemEntity.prototype, "sort", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({
|
|
68
|
+
nullable: true,
|
|
69
|
+
default: null
|
|
70
|
+
}),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], PublicLearningHubItemEntity.prototype, "media", void 0);
|
|
73
|
+
exports.PublicLearningHubItemEntity = PublicLearningHubItemEntity = __decorate([
|
|
74
|
+
(0, typeorm_1.Entity)('publicLearningHubItems'),
|
|
75
|
+
__metadata("design:paramtypes", [Object])
|
|
76
|
+
], PublicLearningHubItemEntity);
|
|
77
|
+
//# sourceMappingURL=learning-hub.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"learning-hub.js","sourceRoot":"","sources":["../../src/public/learning-hub.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAwD;AACxD,qCAAiE;AAEjE,2DAA2D;AAEpD,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IA+DvC,6DAA6D;IAE7D,YAAY,KAA4C;QACvD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD,CAAA;AApEY,kEAA2B;AAMvC;IADC,IAAA,gCAAsB,GAAE;;uDACd;AAWX;IANC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,iBAAQ;QACd,OAAO,EAAE,iBAAQ,CAAC,EAAE;QACpB,QAAQ,EAAE,KAAK;KACf,CAAC;;6DACiB;AAQnB;IANC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,oBAAW;QACjB,OAAO,EAAE,oBAAW,CAAC,OAAO;QAC5B,QAAQ,EAAE,KAAK;KACf,CAAC;;4DACmB;AASrB;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;0DACY;AASd;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;gEACkB;AASpB;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,CAAC;KACV,CAAC;;yDACW;AASb;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;0DACY;sCA7DF,2BAA2B;IADvC,IAAA,gBAAM,EAAC,wBAAwB,CAAC;;GACpB,2BAA2B,CAoEvC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Language } from '@driveup/shared';
|
|
2
|
+
import { CountryEntity } from '../system/country/country.entity';
|
|
3
|
+
export declare class PublicTestimonialEntity {
|
|
4
|
+
/**
|
|
5
|
+
* Primary key - auto-generated sequential ID
|
|
6
|
+
*/
|
|
7
|
+
id: number;
|
|
8
|
+
/**
|
|
9
|
+
* Country ID
|
|
10
|
+
*/
|
|
11
|
+
countryId: number;
|
|
12
|
+
/**
|
|
13
|
+
* Language of the content of the testimonial
|
|
14
|
+
*/
|
|
15
|
+
language: Language;
|
|
16
|
+
/**
|
|
17
|
+
* Testimony title
|
|
18
|
+
*/
|
|
19
|
+
title: string;
|
|
20
|
+
/**
|
|
21
|
+
* User feedback
|
|
22
|
+
*/
|
|
23
|
+
feedback: string;
|
|
24
|
+
/**
|
|
25
|
+
* User image/avatar
|
|
26
|
+
*/
|
|
27
|
+
image: string;
|
|
28
|
+
/**
|
|
29
|
+
* User name
|
|
30
|
+
*/
|
|
31
|
+
name: string;
|
|
32
|
+
/**
|
|
33
|
+
* User position/job title
|
|
34
|
+
*/
|
|
35
|
+
position: string;
|
|
36
|
+
/************************* Relations *************************/
|
|
37
|
+
country: Promise<CountryEntity>;
|
|
38
|
+
/************************* Methods *************************/
|
|
39
|
+
constructor(props?: Partial<PublicTestimonialEntity>);
|
|
40
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PublicTestimonialEntity = void 0;
|
|
13
|
+
const shared_1 = require("@driveup/shared");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const country_entity_1 = require("../system/country/country.entity");
|
|
16
|
+
let PublicTestimonialEntity = class PublicTestimonialEntity {
|
|
17
|
+
/************************* Methods *************************/
|
|
18
|
+
constructor(props) {
|
|
19
|
+
Object.assign(this, props);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.PublicTestimonialEntity = PublicTestimonialEntity;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], PublicTestimonialEntity.prototype, "id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({
|
|
29
|
+
nullable: false
|
|
30
|
+
}),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], PublicTestimonialEntity.prototype, "countryId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({
|
|
35
|
+
type: 'enum',
|
|
36
|
+
enum: shared_1.Language,
|
|
37
|
+
default: shared_1.Language.En,
|
|
38
|
+
nullable: false
|
|
39
|
+
}),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], PublicTestimonialEntity.prototype, "language", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({
|
|
44
|
+
nullable: true,
|
|
45
|
+
default: null
|
|
46
|
+
}),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], PublicTestimonialEntity.prototype, "title", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({
|
|
51
|
+
nullable: true,
|
|
52
|
+
default: null
|
|
53
|
+
}),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], PublicTestimonialEntity.prototype, "feedback", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({
|
|
58
|
+
nullable: true,
|
|
59
|
+
default: null
|
|
60
|
+
}),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], PublicTestimonialEntity.prototype, "image", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({
|
|
65
|
+
nullable: true,
|
|
66
|
+
default: null
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], PublicTestimonialEntity.prototype, "name", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.Column)({
|
|
72
|
+
nullable: true,
|
|
73
|
+
default: null
|
|
74
|
+
}),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], PublicTestimonialEntity.prototype, "position", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.ManyToOne)(() => country_entity_1.CountryEntity, country => country.testimonies),
|
|
79
|
+
__metadata("design:type", Promise)
|
|
80
|
+
], PublicTestimonialEntity.prototype, "country", void 0);
|
|
81
|
+
exports.PublicTestimonialEntity = PublicTestimonialEntity = __decorate([
|
|
82
|
+
(0, typeorm_1.Entity)('publicTestimonials'),
|
|
83
|
+
__metadata("design:paramtypes", [Object])
|
|
84
|
+
], PublicTestimonialEntity);
|
|
85
|
+
//# sourceMappingURL=testimonial.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testimonial.js","sourceRoot":"","sources":["../../src/public/testimonial.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA2C;AAC3C,qCAA4E;AAE5E,qEAAiE;AAG1D,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IA6EnC,6DAA6D;IAE7D,YAAY,KAAwC;QACnD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD,CAAA;AAlFY,0DAAuB;AAMnC;IADC,IAAA,gCAAsB,GAAE;;mDACd;AAQX;IAHC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,KAAK;KACf,CAAC;;0DACgB;AAWlB;IANC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,iBAAQ;QACd,OAAO,EAAE,iBAAQ,CAAC,EAAE;QACpB,QAAQ,EAAE,KAAK;KACf,CAAC;;yDACiB;AASnB;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;sDACY;AASd;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;yDACe;AASjB;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;sDACY;AASd;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;qDACW;AASb;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;yDACe;AAKjB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8BAAa,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC;;wDAC/B;kCA3EpB,uBAAuB;IADnC,IAAA,gBAAM,EAAC,oBAAoB,CAAC;;GAChB,uBAAuB,CAkFnC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Activity, Campaigne
|
|
2
|
-
import { Language, ProductType } from '@driveup/shared';
|
|
1
|
+
import { Activity, Campaigne } from '@driveup/common';
|
|
2
|
+
import { Content, Language, ProductType } from '@driveup/shared';
|
|
3
3
|
import { TrackableEntity } from '../../utils/trackable';
|
|
4
4
|
import { CampaignGiftCodeEntity } from './gifcode.entity';
|
|
5
5
|
/**
|
|
@@ -32,7 +32,7 @@ export declare class CampaignEntity extends TrackableEntity<Campaigne> {
|
|
|
32
32
|
/**
|
|
33
33
|
* Campaign expiration date - after this date, codes cannot be redeemed
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
expiryDate: Date;
|
|
36
36
|
/**
|
|
37
37
|
* Gift codes associated with this campaign
|
|
38
38
|
*/
|
|
@@ -48,7 +48,7 @@ let CampaignEntity = class CampaignEntity extends trackable_1.TrackableEntity {
|
|
|
48
48
|
description: transaltion.description,
|
|
49
49
|
giftAmount: this.giftAmount,
|
|
50
50
|
imageUrl: transaltion.url || this.imageUrl,
|
|
51
|
-
exipryDate: this.
|
|
51
|
+
exipryDate: this.expiryDate,
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
toSummary(lang) {
|
|
@@ -69,7 +69,7 @@ let CampaignEntity = class CampaignEntity 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 CampaignEntity = class CampaignEntity 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,
|
|
@@ -139,7 +139,7 @@ __decorate([
|
|
|
139
139
|
default: null
|
|
140
140
|
}),
|
|
141
141
|
__metadata("design:type", Date)
|
|
142
|
-
], CampaignEntity.prototype, "
|
|
142
|
+
], CampaignEntity.prototype, "expiryDate", void 0);
|
|
143
143
|
__decorate([
|
|
144
144
|
(0, typeorm_1.OneToMany)(() => gifcode_entity_1.CampaignGiftCodeEntity, giftCode => giftCode.campaign),
|
|
145
145
|
__metadata("design:type", Promise)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"campaign.entity.js","sourceRoot":"","sources":["../../../src/system/campaign/campaign.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA+
|
|
1
|
+
{"version":3,"file":"campaign.entity.js","sourceRoot":"","sources":["../../../src/system/campaign/campaign.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAsD;AACtD,4CAA+E;AAC/E,6CAA0C;AAC1C,qCAAoD;AAEpD,iEAAyD;AACzD,qDAAwD;AACxD,wDAAoD;AACpD,qDAA0D;AAE1D;;;;;;;GAOG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,2BAA0B;IA6D7D;;;OAGG;IACH,YA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AAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;gDACe;AAajB;IAPC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,SAAS;QACf,SAAS,EAAE,EAAE;QACb,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,CAAC;KACV,CAAC;;kDACiB;AASnB;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;8BACU,IAAI;kDAAC;AAMjB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAsB,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC;;iDAC1B;yBA3DjC,cAAc;IAD1B,IAAA,gBAAM,EAAC,iBAAiB,CAAC;;GACb,cAAc,CA2I1B"}
|
|
@@ -22,11 +22,11 @@ export declare class CampaignGiftCodeEntity extends TrackableEntity<GiftCode> {
|
|
|
22
22
|
/**
|
|
23
23
|
* ID of the user who registered/used this gift code
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
registeredBy: number;
|
|
26
26
|
/**
|
|
27
27
|
* Timestamp when this gift code was registered/used
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
registeredOn: Date;
|
|
30
30
|
/**
|
|
31
31
|
* The campaign associated with this gift code
|
|
32
32
|
*/
|
|
@@ -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.
|
|
59
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.registeredBy, this.registeredOn, shared_1.ActivityType.registered));
|
|
60
60
|
return activities;
|
|
61
61
|
}
|
|
62
62
|
};
|
|
@@ -85,11 +85,11 @@ __decorate([
|
|
|
85
85
|
__decorate([
|
|
86
86
|
(0, typeorm_1.Column)({ nullable: true, default: null }),
|
|
87
87
|
__metadata("design:type", Number)
|
|
88
|
-
], CampaignGiftCodeEntity.prototype, "
|
|
88
|
+
], CampaignGiftCodeEntity.prototype, "registeredBy", void 0);
|
|
89
89
|
__decorate([
|
|
90
90
|
(0, typeorm_1.Column)({ nullable: true, default: null }),
|
|
91
91
|
__metadata("design:type", Date)
|
|
92
|
-
], CampaignGiftCodeEntity.prototype, "
|
|
92
|
+
], CampaignGiftCodeEntity.prototype, "registeredOn", void 0);
|
|
93
93
|
__decorate([
|
|
94
94
|
(0, typeorm_1.ManyToOne)(() => campaign_entity_1.CampaignEntity, campaign => campaign.giftCodes),
|
|
95
95
|
__metadata("design:type", Promise)
|
|
@@ -1 +1 @@
|
|
|
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;IACv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IAAI,CAAC,MAAM,IAAA,4BAAU,EAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,qBAAY,CAAC,UAAU,CAAC,CAAC,CAAC;QACjG,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;;4DACrB;AAMrB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BAC5B,IAAI;4DAAC;AAMnB;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,13 @@
|
|
|
1
|
-
import { Activity, Country
|
|
2
|
-
import { Language } from '@driveup/shared';
|
|
3
|
-
import { AddonCountryEntity } from '../../catalog/addon/country.entity';
|
|
1
|
+
import { Activity, Country } from '@driveup/common';
|
|
2
|
+
import { Holiday, Language, WorkingHours } from '@driveup/shared';
|
|
4
3
|
import { CountryProductEntity } from '../../catalog/product/country.entity';
|
|
5
4
|
import { CompanyEntity } from '../../profile/company/company.entity';
|
|
6
|
-
import {
|
|
7
|
-
import { TrackableEntity } from '../../utils/trackable';
|
|
5
|
+
import { AddonCountryEntity } from '../../catalog/addon/country.entity';
|
|
8
6
|
import { CurrencyEntity } from '../currency/currency.entity';
|
|
9
7
|
import { DrivingCategoryEntity } from '../driving/category.entity';
|
|
8
|
+
import { PublicTestimonialEntity } from '../../public/testimonial';
|
|
9
|
+
import { UserEntity } from '../../user/user.entity';
|
|
10
|
+
import { TrackableEntity } from '../../utils/trackable';
|
|
10
11
|
/**
|
|
11
12
|
* Represents a country in the system.
|
|
12
13
|
* Countries define regional settings including languages, currency, timezones,
|
|
@@ -99,6 +100,7 @@ export declare class CountryEntity extends TrackableEntity<Country> {
|
|
|
99
100
|
* Driving license categories available in this country
|
|
100
101
|
*/
|
|
101
102
|
drivingCategories: Promise<DrivingCategoryEntity[]>;
|
|
103
|
+
testimonies: Promise<PublicTestimonialEntity[]>;
|
|
102
104
|
/**
|
|
103
105
|
* Creates a new CountryEntity instance
|
|
104
106
|
* @param props - Partial properties to initialize the entity
|
|
@@ -13,14 +13,15 @@ exports.CountryEntity = void 0;
|
|
|
13
13
|
const common_1 = require("@driveup/common");
|
|
14
14
|
const shared_1 = require("@driveup/shared");
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
|
-
const country_entity_1 = require("../../catalog/
|
|
17
|
-
const country_entity_2 = require("../../catalog/product/country.entity");
|
|
16
|
+
const country_entity_1 = require("../../catalog/product/country.entity");
|
|
18
17
|
const company_entity_1 = require("../../profile/company/company.entity");
|
|
19
|
-
const
|
|
18
|
+
const country_entity_2 = require("../../catalog/addon/country.entity");
|
|
20
19
|
const activity_helper_1 = require("../../utils/activity.helper");
|
|
21
|
-
const trackable_1 = require("../../utils/trackable");
|
|
22
20
|
const currency_entity_1 = require("../currency/currency.entity");
|
|
23
21
|
const category_entity_1 = require("../driving/category.entity");
|
|
22
|
+
const testimonial_1 = require("../../public/testimonial");
|
|
23
|
+
const user_entity_1 = require("../../user/user.entity");
|
|
24
|
+
const trackable_1 = require("../../utils/trackable");
|
|
24
25
|
const staff_entity_1 = require("../staff/staff.entity");
|
|
25
26
|
/**
|
|
26
27
|
* Represents a country in the system.
|
|
@@ -179,11 +180,11 @@ __decorate([
|
|
|
179
180
|
__metadata("design:type", Promise)
|
|
180
181
|
], CountryEntity.prototype, "currency", void 0);
|
|
181
182
|
__decorate([
|
|
182
|
-
(0, typeorm_1.OneToMany)(() =>
|
|
183
|
+
(0, typeorm_1.OneToMany)(() => country_entity_1.CountryProductEntity, product => product.country),
|
|
183
184
|
__metadata("design:type", Promise)
|
|
184
185
|
], CountryEntity.prototype, "products", void 0);
|
|
185
186
|
__decorate([
|
|
186
|
-
(0, typeorm_1.OneToMany)(() =>
|
|
187
|
+
(0, typeorm_1.OneToMany)(() => country_entity_2.AddonCountryEntity, product => product.country),
|
|
187
188
|
__metadata("design:type", Promise)
|
|
188
189
|
], CountryEntity.prototype, "addons", void 0);
|
|
189
190
|
__decorate([
|
|
@@ -198,6 +199,10 @@ __decorate([
|
|
|
198
199
|
(0, typeorm_1.OneToMany)(() => category_entity_1.DrivingCategoryEntity, category => category.country),
|
|
199
200
|
__metadata("design:type", Promise)
|
|
200
201
|
], CountryEntity.prototype, "drivingCategories", void 0);
|
|
202
|
+
__decorate([
|
|
203
|
+
(0, typeorm_1.OneToMany)(() => testimonial_1.PublicTestimonialEntity, testimonial => testimonial.country),
|
|
204
|
+
__metadata("design:type", Promise)
|
|
205
|
+
], CountryEntity.prototype, "testimonies", void 0);
|
|
201
206
|
exports.CountryEntity = CountryEntity = __decorate([
|
|
202
207
|
(0, typeorm_1.Entity)('systemCountries'),
|
|
203
208
|
__metadata("design:paramtypes", [Object])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"country.entity.js","sourceRoot":"","sources":["../../../src/system/country/country.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"country.entity.js","sourceRoot":"","sources":["../../../src/system/country/country.entity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BAAS,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;AAGpD;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAuB,EAAE,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;;kDAC7B;wBAxJpC,aAAa;IADzB,IAAA,gBAAM,EAAC,iBAAiB,CAAC;;GACb,aAAa,CA0NzB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Activity,
|
|
2
|
-
import { ColorContext, Language } from '@driveup/shared';
|
|
1
|
+
import { Activity, DrivingCategory } from '@driveup/common';
|
|
2
|
+
import { ColorContext, Content, Language, Metadata } from '@driveup/shared';
|
|
3
3
|
import { ProgramEntity } from '../../catalog/program/program.entity';
|
|
4
4
|
import { SeedCourseEntity } from '../../catalog/seed/courses/course.entity';
|
|
5
5
|
import { CompanyCourseEntity } from '../../profile/company/course/course.entity';
|
|
@@ -71,7 +71,7 @@ let DrivingCategoryEntity = class DrivingCategoryEntity extends trackable_1.Trac
|
|
|
71
71
|
getTranslation(lang) {
|
|
72
72
|
const language = lang || nestjs_i18n_1.I18nContext.current()?.lang;
|
|
73
73
|
const translation = this.translations?.find(t => t.language === language);
|
|
74
|
-
return new
|
|
74
|
+
return new shared_1.Content({
|
|
75
75
|
title: translation?.title,
|
|
76
76
|
description: translation?.description,
|
|
77
77
|
content: translation?.content,
|
|
@@ -84,7 +84,7 @@ let DrivingCategoryEntity = class DrivingCategoryEntity extends trackable_1.Trac
|
|
|
84
84
|
* @returns Array of Content objects for all languages
|
|
85
85
|
*/
|
|
86
86
|
getTranslations() {
|
|
87
|
-
return this.translations?.map(t => new
|
|
87
|
+
return this.translations?.map(t => new shared_1.Content({
|
|
88
88
|
title: t.title,
|
|
89
89
|
description: t.description,
|
|
90
90
|
content: t.content,
|
|
@@ -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,4CAA4D;AAC5D,4CAA0F;AAC1F,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;;;;OA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AAC,4CAA2B,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;;qEACX;AAS/D;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,mCAAmB,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC;;6DACrB;AAM/C;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oDAA+B,EAAE,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC;;kEACtB;AAMhE;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAoB,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;;8DAClB;AAMjD;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8BAAa,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;;uDAC1B;AAMlC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,gCAAgB,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC;;0DACxB;AAMzC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kCAAiB,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;;2DACrB;gCAjK/B,qBAAqB;IADjC,IAAA,gBAAM,EAAC,yBAAyB,CAAC;;GACrB,qBAAqB,CAgPjC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { SelectedProfile } from '@driveup/shared';
|
|
2
|
+
/**
|
|
3
|
+
* ICal Entity
|
|
4
|
+
* - Represents the state of an profiles's calendar (busy/public)
|
|
5
|
+
* - Contains information about which appointments are active and which have been canceled
|
|
6
|
+
*/
|
|
7
|
+
export declare class ICalEntity {
|
|
8
|
+
/**
|
|
9
|
+
* Primary key - auto-generated sequential ID
|
|
10
|
+
*/
|
|
11
|
+
id: number;
|
|
12
|
+
/**
|
|
13
|
+
* Timestamp when the entity was created
|
|
14
|
+
* Automatically set by TypeORM
|
|
15
|
+
*/
|
|
16
|
+
createdOn: Date;
|
|
17
|
+
/**
|
|
18
|
+
* Timestamp when the entity was last updated
|
|
19
|
+
* Automatically updated by TypeORM
|
|
20
|
+
*/
|
|
21
|
+
updatedOn: Date;
|
|
22
|
+
/**
|
|
23
|
+
* Timestamp when the entity was soft-deleted
|
|
24
|
+
* When set, the entity is excluded from normal queries
|
|
25
|
+
*/
|
|
26
|
+
deletedOn: Date;
|
|
27
|
+
/**
|
|
28
|
+
* Unique identifier for this calendar state entry
|
|
29
|
+
* - generated as a UUID
|
|
30
|
+
* - Is used in the calendar sharing URLs to identify the specific calendar state (calendar link : `api.com/shared/calendar/instructor/{this.uid}`)
|
|
31
|
+
*/
|
|
32
|
+
uid: string;
|
|
33
|
+
/**
|
|
34
|
+
* Profile for the calendar link
|
|
35
|
+
*/
|
|
36
|
+
profile: SelectedProfile;
|
|
37
|
+
/**
|
|
38
|
+
* Whether or not the titles and details of appointments are visible to the public
|
|
39
|
+
* - true: titles and details are visible
|
|
40
|
+
* - false: titles and details are hidden
|
|
41
|
+
*/
|
|
42
|
+
public: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* UIDs of appointments currently considered ACTIVE
|
|
45
|
+
* - the keys are the UIDs, the values are objects with startDate and endDate as ISO strings
|
|
46
|
+
*/
|
|
47
|
+
activeUids: Record<string, {
|
|
48
|
+
startDate: string;
|
|
49
|
+
endDate: string;
|
|
50
|
+
}>;
|
|
51
|
+
/**
|
|
52
|
+
* Tombstones: uid -> ISO timestamp when cancelled
|
|
53
|
+
* - the keys are the UIDs of cancelled appointments
|
|
54
|
+
* - the startDate and endDate fields are ISO strings representing the original start and end dates of the cancelled appointment
|
|
55
|
+
*/
|
|
56
|
+
canceledUids: Record<string, {
|
|
57
|
+
startDate: string;
|
|
58
|
+
endDate: string;
|
|
59
|
+
canceledOn: string;
|
|
60
|
+
}>;
|
|
61
|
+
/************************* Methods *************************/
|
|
62
|
+
constructor(props?: Partial<ICalEntity>);
|
|
63
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ICalEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const typeorm_2 = require("typeorm");
|
|
15
|
+
/**
|
|
16
|
+
* ICal Entity
|
|
17
|
+
* - Represents the state of an profiles's calendar (busy/public)
|
|
18
|
+
* - Contains information about which appointments are active and which have been canceled
|
|
19
|
+
*/
|
|
20
|
+
let ICalEntity = class ICalEntity {
|
|
21
|
+
/************************* Methods *************************/
|
|
22
|
+
constructor(props) {
|
|
23
|
+
Object.assign(this, props);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
exports.ICalEntity = ICalEntity;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], ICalEntity.prototype, "id", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_2.CreateDateColumn)({ nullable: true, default: null }),
|
|
33
|
+
__metadata("design:type", Date)
|
|
34
|
+
], ICalEntity.prototype, "createdOn", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_2.UpdateDateColumn)({ nullable: true, default: null }),
|
|
37
|
+
__metadata("design:type", Date)
|
|
38
|
+
], ICalEntity.prototype, "updatedOn", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_2.DeleteDateColumn)({ nullable: true, default: null }),
|
|
41
|
+
__metadata("design:type", Date)
|
|
42
|
+
], ICalEntity.prototype, "deletedOn", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)(),
|
|
45
|
+
(0, typeorm_1.Generated)('uuid'),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], ICalEntity.prototype, "uid", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({
|
|
50
|
+
type: 'simple-json',
|
|
51
|
+
}),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], ICalEntity.prototype, "profile", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
56
|
+
__metadata("design:type", Boolean)
|
|
57
|
+
], ICalEntity.prototype, "public", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ type: 'json' }),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], ICalEntity.prototype, "activeUids", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ type: 'json' }),
|
|
64
|
+
__metadata("design:type", Object)
|
|
65
|
+
], ICalEntity.prototype, "canceledUids", void 0);
|
|
66
|
+
exports.ICalEntity = ICalEntity = __decorate([
|
|
67
|
+
(0, typeorm_1.Entity)('icals'),
|
|
68
|
+
__metadata("design:paramtypes", [Object])
|
|
69
|
+
], ICalEntity);
|
|
70
|
+
//# sourceMappingURL=ical.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ical.entity.js","sourceRoot":"","sources":["../../../src/system/ical/ical.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qCAAuF;AACvF,qCAA+E;AAE/E;;;;GAIG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAU;IAoEtB,6DAA6D;IAE7D,YAAY,KAA2B;QACtC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD,CAAA;AAzEY,gCAAU;AAKtB;IADC,IAAA,gCAAsB,GAAE;;sCACd;AAOX;IADC,IAAA,0BAAgB,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BACzC,IAAI;6CAAC;AAOhB;IADC,IAAA,0BAAgB,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BACzC,IAAI;6CAAC;AAOhB;IADC,IAAA,0BAAgB,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BACzC,IAAI;6CAAC;AAShB;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,mBAAS,EAAC,MAAM,CAAC;;uCACN;AAQZ;IAHC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,aAAa;KACnB,CAAC;;2CACuB;AAQzB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;0CACZ;AAOhB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8CAC0C;AAQnE;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDACgE;qBAlE7E,UAAU;IADtB,IAAA,gBAAM,EAAC,OAAO,CAAC;;GACH,UAAU,CAyEtB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Activity,
|
|
2
|
-
import { ColorContext, Language, PolicyType } from '@driveup/shared';
|
|
1
|
+
import { Activity, Policy } from '@driveup/common';
|
|
2
|
+
import { ColorContext, Content, Language, Metadata, PolicyType } from '@driveup/shared';
|
|
3
3
|
import { UserAlertEntity } from '../../user/alert.entity';
|
|
4
4
|
import { TrackableEntity } from '../../utils/trackable';
|
|
5
5
|
/**
|