@driveup/schema 0.2.2 → 0.2.3
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 +21 -21
- package/lib/catalog/addon/addon.entity.js.map +1 -1
- package/lib/catalog/addon/country.entity.d.ts +2 -1
- package/lib/catalog/addon/country.entity.js +9 -8
- 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 +10 -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 +41 -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 +11 -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 +37 -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 +20 -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 +26 -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 +9 -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 +10 -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 +10 -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 +8 -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 +4 -8
- package/lib/profile/agent/agent.entity.js +21 -28
- 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 +9 -9
- package/lib/profile/agent/payout.entity.js.map +1 -1
- package/lib/profile/agent/promotion.entity.js +5 -4
- package/lib/profile/agent/promotion.entity.js.map +1 -1
- package/lib/profile/company/company.entity.d.ts +4 -4
- package/lib/profile/company/company.entity.js +28 -28
- package/lib/profile/company/company.entity.js.map +1 -1
- package/lib/profile/company/course/appointment.entity.d.ts +3 -2
- package/lib/profile/company/course/appointment.entity.js +5 -4
- package/lib/profile/company/course/appointment.entity.js.map +1 -1
- package/lib/profile/company/course/course.entity.d.ts +18 -4
- package/lib/profile/company/course/course.entity.js +42 -15
- package/lib/profile/company/course/course.entity.js.map +1 -1
- package/lib/profile/company/course/lesson.entity.d.ts +2 -0
- package/lib/profile/company/course/lesson.entity.js +7 -6
- package/lib/profile/company/course/lesson.entity.js.map +1 -1
- package/lib/profile/company/course/topic.entity.js +5 -4
- 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 +7 -6
- package/lib/profile/company/finances/billing/bill.entity.js.map +1 -1
- package/lib/profile/company/finances/billing/item.entity.js +5 -4
- 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 +5 -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 +13 -12
- package/lib/profile/company/finances/expense/expense.entity.js.map +1 -1
- package/lib/profile/company/finances/handover/handover.entity.js +6 -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 +26 -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 +7 -6
- package/lib/profile/company/finances/invoice/item.entity.js.map +1 -1
- package/lib/profile/company/finances/payment/method.entity.js +7 -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 +17 -9
- package/lib/profile/company/instructor/instructor.entity.js +53 -36
- package/lib/profile/company/instructor/instructor.entity.js.map +1 -1
- package/lib/profile/company/instructor/task.entity.js +5 -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 +5 -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 +8 -7
- package/lib/profile/company/medical/product.entity.js.map +1 -1
- package/lib/profile/company/product/addon.entity.js +11 -10
- 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 +12 -5
- package/lib/profile/company/product/priceplan.entity.js.map +1 -1
- package/lib/profile/company/product/product.entity.d.ts +11 -4
- package/lib/profile/company/product/product.entity.js +25 -18
- 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 +7 -6
- package/lib/profile/company/product/vehicle.entity.js.map +1 -1
- package/lib/profile/instructor/instructor.entity.d.ts +2 -8
- package/lib/profile/instructor/instructor.entity.js +13 -25
- 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 +9 -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 +11 -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 +16 -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 +9 -8
- package/lib/profile/student/program/program.entity.js.map +1 -1
- package/lib/profile/student/program/training/appointment.entity.d.ts +2 -1
- package/lib/profile/student/program/training/appointment.entity.js +12 -11
- 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 +12 -12
- package/lib/profile/student/program/training/exam.entity.js.map +1 -1
- package/lib/profile/student/program/training/lesson.entity.js +5 -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 +15 -14
- package/lib/profile/student/program/training/request.entity.js.map +1 -1
- package/lib/profile/student/program/training/topic.entity.js +9 -8
- package/lib/profile/student/program/training/topic.entity.js.map +1 -1
- package/lib/profile/student/program/training/training.entity.d.ts +2 -3
- package/lib/profile/student/program/training/training.entity.js +28 -29
- 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 +14 -14
- package/lib/profile/student/student.entity.d.ts +2 -7
- package/lib/profile/student/student.entity.js +13 -24
- 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 +9 -9
- package/lib/system/campaign/campaign.entity.js.map +1 -1
- package/lib/system/campaign/gifcode.entity.d.ts +2 -1
- package/lib/system/campaign/gifcode.entity.js +7 -6
- 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 +12 -11
- package/lib/system/country/country.entity.js.map +1 -1
- package/lib/system/currency/currency.entity.js +5 -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 +14 -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 +7 -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 +11 -10
- package/lib/system/event/event.entity.js.map +1 -1
- package/lib/system/event/log.entity.d.ts +2 -1
- package/lib/system/event/log.entity.js +11 -10
- 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 +18 -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 +11 -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 +30 -11
- package/lib/user/alert.entity.js.map +1 -1
- package/lib/user/blocked.entity.js +5 -5
- package/lib/user/blocked.entity.js.map +1 -1
- package/lib/user/device.entity.js +5 -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 +13 -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 +20 -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 +96 -50
- package/lib/user/user.entity.js.map +1 -1
- package/lib/user/verification.entity.js +5 -5
- package/lib/user/verification.entity.js.map +1 -1
- package/lib/utils/activity.helper.d.ts +2 -1
- 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 +3 -2
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.PolicyEntity = 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 alert_entity_1 = require("../../user/alert.entity");
|
|
18
18
|
const staff_entity_1 = require("../staff/staff.entity");
|
|
19
19
|
const trackable_1 = require("../../utils/trackable");
|
|
@@ -42,14 +42,14 @@ let PolicyEntity = class PolicyEntity extends trackable_1.TrackableEntity {
|
|
|
42
42
|
*/
|
|
43
43
|
toModel(lang) {
|
|
44
44
|
const transaltion = this.getTranslation(lang);
|
|
45
|
-
return new
|
|
45
|
+
return new common_1.Policy({
|
|
46
46
|
id: this.id,
|
|
47
47
|
type: this.type,
|
|
48
48
|
color: this.color,
|
|
49
49
|
active: this.active,
|
|
50
50
|
title: transaltion.title,
|
|
51
51
|
description: transaltion.description,
|
|
52
|
-
imageUrl: transaltion.
|
|
52
|
+
imageUrl: transaltion.url,
|
|
53
53
|
metadata: this.getMetadata(),
|
|
54
54
|
});
|
|
55
55
|
}
|
|
@@ -67,13 +67,13 @@ let PolicyEntity = class PolicyEntity extends trackable_1.TrackableEntity {
|
|
|
67
67
|
* @returns Content instance with translated title and description
|
|
68
68
|
*/
|
|
69
69
|
getTranslation(lang) {
|
|
70
|
-
const language = (lang || nestjs_i18n_1.I18nContext.current()?.lang) ||
|
|
70
|
+
const language = (lang || nestjs_i18n_1.I18nContext.current()?.lang) || shared_1.Language.En;
|
|
71
71
|
const translation = this.translations?.find(t => t.language === language);
|
|
72
72
|
return new common_1.Content({
|
|
73
73
|
title: translation?.title,
|
|
74
74
|
description: translation?.description,
|
|
75
75
|
content: translation?.content,
|
|
76
|
-
|
|
76
|
+
url: translation?.url,
|
|
77
77
|
link: translation?.link,
|
|
78
78
|
});
|
|
79
79
|
}
|
|
@@ -86,7 +86,7 @@ let PolicyEntity = class PolicyEntity extends trackable_1.TrackableEntity {
|
|
|
86
86
|
title: t.title,
|
|
87
87
|
description: t.description,
|
|
88
88
|
content: t.content,
|
|
89
|
-
|
|
89
|
+
url: t.url,
|
|
90
90
|
link: t.link,
|
|
91
91
|
language: t.language
|
|
92
92
|
}));
|
|
@@ -96,14 +96,14 @@ let PolicyEntity = class PolicyEntity 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.createdOn,
|
|
101
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.updatedBy,
|
|
102
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.updatedOn,
|
|
103
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.enabledBy,
|
|
104
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.enabledOn,
|
|
105
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.disabledBy,
|
|
106
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.disabledOn,
|
|
99
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy, shared_1.ActivityType.createdBy, staff_entity_1.StaffEntity));
|
|
100
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.createdOn, shared_1.ActivityType.createdOn));
|
|
101
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.updatedBy, shared_1.ActivityType.updatedBy, staff_entity_1.StaffEntity));
|
|
102
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.updatedOn, shared_1.ActivityType.updatedOn));
|
|
103
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.enabledBy, shared_1.ActivityType.enabledBy, staff_entity_1.StaffEntity));
|
|
104
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.enabledOn, shared_1.ActivityType.createdOn));
|
|
105
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.disabledBy, shared_1.ActivityType.disabledBy, staff_entity_1.StaffEntity));
|
|
106
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.disabledOn, shared_1.ActivityType.disabledOn));
|
|
107
107
|
return activities.filter(a => a);
|
|
108
108
|
}
|
|
109
109
|
};
|
|
@@ -112,8 +112,8 @@ __decorate([
|
|
|
112
112
|
(0, typeorm_1.Column)({
|
|
113
113
|
type: 'enum',
|
|
114
114
|
name: 'policyType',
|
|
115
|
-
enum:
|
|
116
|
-
default:
|
|
115
|
+
enum: shared_1.PolicyType,
|
|
116
|
+
default: shared_1.PolicyType.MissingRecoveryEmail,
|
|
117
117
|
nullable: false
|
|
118
118
|
}),
|
|
119
119
|
__metadata("design:type", String)
|
|
@@ -121,8 +121,8 @@ __decorate([
|
|
|
121
121
|
__decorate([
|
|
122
122
|
(0, typeorm_1.Column)({
|
|
123
123
|
type: 'enum',
|
|
124
|
-
enum:
|
|
125
|
-
default:
|
|
124
|
+
enum: shared_1.ColorContext,
|
|
125
|
+
default: shared_1.ColorContext.Info,
|
|
126
126
|
nullable: false
|
|
127
127
|
}),
|
|
128
128
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy.entity.js","sourceRoot":"","sources":["../../../src/system/policy/policy.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAoD;AACpD,6CAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"policy.entity.js","sourceRoot":"","sources":["../../../src/system/policy/policy.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAoD;AACpD,6CAA0C;AAC1C,4CAAmF;AACnF,4CAAsE;AACtE,0DAA0D;AAC1D,wDAAoD;AACpD,qDAAwD;AACxD,iEAAyD;AAEzD;;;;;;;GAOG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,2BAAuB;IA4FxD;;;OAGG;IACH,YAAY,KAA6B;QACxC,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,eAAM,CAAC;YACjB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,KAAK,EAAE,WAAW,CAAC,KAAK;YACxB,WAAW,EAAE,WAAW,CAAC,WAAW;YACpC,QAAQ,EAAE,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AAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;;4CACrB;uBA1FvB,YAAY;IADxB,IAAA,gBAAM,EAAC,gBAAgB,CAAC;;GACZ,YAAY,CAiLxB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { AccountStatus, Language,
|
|
1
|
+
import { AccountStatus, Language, StaffRole } from '@driveup/shared';
|
|
2
|
+
import { Person, Activity, Staff } from '@driveup/common';
|
|
2
3
|
import { TrackableEntity } from '../../utils/trackable';
|
|
3
4
|
/**
|
|
4
5
|
* Represents a staff member in the system.
|
|
@@ -12,6 +12,7 @@ var StaffEntity_1;
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.StaffEntity = void 0;
|
|
14
14
|
const typeorm_1 = require("typeorm");
|
|
15
|
+
const shared_1 = require("@driveup/shared");
|
|
15
16
|
const common_1 = require("@driveup/common");
|
|
16
17
|
const trackable_1 = require("../../utils/trackable");
|
|
17
18
|
const activity_helper_1 = require("../../utils/activity.helper");
|
|
@@ -73,10 +74,10 @@ let StaffEntity = StaffEntity_1 = class StaffEntity extends trackable_1.Trackabl
|
|
|
73
74
|
*/
|
|
74
75
|
async getActivities() {
|
|
75
76
|
const activities = [];
|
|
76
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy,
|
|
77
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.createdOn,
|
|
78
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.updatedBy,
|
|
79
|
-
activities.push(await (0, activity_helper_1.toActivity)(this.updatedOn,
|
|
77
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy, shared_1.ActivityType.createdBy, StaffEntity_1));
|
|
78
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.createdOn, shared_1.ActivityType.createdOn));
|
|
79
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.updatedBy, shared_1.ActivityType.updatedBy, StaffEntity_1));
|
|
80
|
+
activities.push(await (0, activity_helper_1.toActivity)(this.updatedOn, shared_1.ActivityType.updatedOn));
|
|
80
81
|
return activities.filter(a => a);
|
|
81
82
|
}
|
|
82
83
|
};
|
|
@@ -84,8 +85,8 @@ exports.StaffEntity = StaffEntity;
|
|
|
84
85
|
__decorate([
|
|
85
86
|
(0, typeorm_1.Column)({
|
|
86
87
|
type: 'enum',
|
|
87
|
-
enum:
|
|
88
|
-
default:
|
|
88
|
+
enum: shared_1.AccountStatus,
|
|
89
|
+
default: shared_1.AccountStatus.Pending,
|
|
89
90
|
nullable: false
|
|
90
91
|
}),
|
|
91
92
|
__metadata("design:type", String)
|
|
@@ -93,8 +94,8 @@ __decorate([
|
|
|
93
94
|
__decorate([
|
|
94
95
|
(0, typeorm_1.Column)({
|
|
95
96
|
type: 'enum',
|
|
96
|
-
enum:
|
|
97
|
-
default:
|
|
97
|
+
enum: shared_1.StaffRole,
|
|
98
|
+
default: shared_1.StaffRole.CustomerSupportManager,
|
|
98
99
|
nullable: false
|
|
99
100
|
}),
|
|
100
101
|
__metadata("design:type", String)
|
|
@@ -102,8 +103,8 @@ __decorate([
|
|
|
102
103
|
__decorate([
|
|
103
104
|
(0, typeorm_1.Column)({
|
|
104
105
|
type: 'enum',
|
|
105
|
-
enum:
|
|
106
|
-
default:
|
|
106
|
+
enum: shared_1.Language,
|
|
107
|
+
default: shared_1.Language.En,
|
|
107
108
|
nullable: true
|
|
108
109
|
}),
|
|
109
110
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staff.entity.js","sourceRoot":"","sources":["../../../src/system/staff/staff.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"staff.entity.js","sourceRoot":"","sources":["../../../src/system/staff/staff.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAoD;AACpD,4CAAmF;AACnF,4CAA0D;AAC1D,qDAAwD;AACxD,iEAAyD;AAEzD;;;;;;;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