@driveup/schema 0.1.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/README.md +174 -0
- package/lib/catalog/addon/addon.entity.d.ts +109 -0
- package/lib/catalog/addon/addon.entity.js +260 -0
- package/lib/catalog/addon/addon.entity.js.map +1 -0
- package/lib/catalog/addon/country.entity.d.ts +112 -0
- package/lib/catalog/addon/country.entity.js +246 -0
- package/lib/catalog/addon/country.entity.js.map +1 -0
- package/lib/catalog/driving/category.entity.d.ts +122 -0
- package/lib/catalog/driving/category.entity.js +217 -0
- package/lib/catalog/driving/category.entity.js.map +1 -0
- package/lib/catalog/driving/vehicle.entity.d.ts +49 -0
- package/lib/catalog/driving/vehicle.entity.js +97 -0
- package/lib/catalog/driving/vehicle.entity.js.map +1 -0
- package/lib/catalog/priceplan/priceplan.entity.d.ts +123 -0
- package/lib/catalog/priceplan/priceplan.entity.js +288 -0
- package/lib/catalog/priceplan/priceplan.entity.js.map +1 -0
- package/lib/catalog/product/country.entity.d.ts +109 -0
- package/lib/catalog/product/country.entity.js +233 -0
- package/lib/catalog/product/country.entity.js.map +1 -0
- package/lib/catalog/product/priceplan.entity.d.ts +113 -0
- package/lib/catalog/product/priceplan.entity.js +251 -0
- package/lib/catalog/product/priceplan.entity.js.map +1 -0
- package/lib/catalog/product/product.entity.d.ts +104 -0
- package/lib/catalog/product/product.entity.js +262 -0
- package/lib/catalog/product/product.entity.js.map +1 -0
- package/lib/catalog/program/program.entity.d.ts +107 -0
- package/lib/catalog/program/program.entity.js +247 -0
- package/lib/catalog/program/program.entity.js.map +1 -0
- package/lib/catalog/seed/assets/asset.entity.d.ts +68 -0
- package/lib/catalog/seed/assets/asset.entity.js +163 -0
- package/lib/catalog/seed/assets/asset.entity.js.map +1 -0
- package/lib/catalog/seed/courses/course.entity.d.ts +98 -0
- package/lib/catalog/seed/courses/course.entity.js +216 -0
- package/lib/catalog/seed/courses/course.entity.js.map +1 -0
- package/lib/catalog/seed/courses/lesson.entity.d.ts +90 -0
- package/lib/catalog/seed/courses/lesson.entity.js +214 -0
- package/lib/catalog/seed/courses/lesson.entity.js.map +1 -0
- package/lib/catalog/seed/courses/topic.entity.d.ts +77 -0
- package/lib/catalog/seed/courses/topic.entity.js +185 -0
- package/lib/catalog/seed/courses/topic.entity.js.map +1 -0
- package/lib/catalog/seed/expense/category.entity.d.ts +61 -0
- package/lib/catalog/seed/expense/category.entity.js +153 -0
- package/lib/catalog/seed/expense/category.entity.js.map +1 -0
- package/lib/index.d.ts +67 -0
- package/lib/index.js +89 -0
- package/lib/index.js.map +1 -0
- package/lib/profile/agent/agent.entity.d.ts +95 -0
- package/lib/profile/agent/agent.entity.js +223 -0
- package/lib/profile/agent/agent.entity.js.map +1 -0
- package/lib/profile/agent/payout.entity.d.ts +70 -0
- package/lib/profile/agent/payout.entity.js +160 -0
- package/lib/profile/agent/payout.entity.js.map +1 -0
- package/lib/profile/agent/promotion.entity.d.ts +82 -0
- package/lib/profile/agent/promotion.entity.js +174 -0
- package/lib/profile/agent/promotion.entity.js.map +1 -0
- package/lib/profile/company/company.entity.d.ts +234 -0
- package/lib/profile/company/company.entity.js +558 -0
- package/lib/profile/company/company.entity.js.map +1 -0
- package/lib/profile/company/course/appointment.entity.d.ts +111 -0
- package/lib/profile/company/course/appointment.entity.js +240 -0
- package/lib/profile/company/course/appointment.entity.js.map +1 -0
- package/lib/profile/company/course/course.entity.d.ts +156 -0
- package/lib/profile/company/course/course.entity.js +365 -0
- package/lib/profile/company/course/course.entity.js.map +1 -0
- package/lib/profile/company/course/lesson.entity.d.ts +123 -0
- package/lib/profile/company/course/lesson.entity.js +288 -0
- package/lib/profile/company/course/lesson.entity.js.map +1 -0
- package/lib/profile/company/course/topic.entity.d.ts +55 -0
- package/lib/profile/company/course/topic.entity.js +147 -0
- package/lib/profile/company/course/topic.entity.js.map +1 -0
- package/lib/profile/company/finances/billing/bill.entity.d.ts +145 -0
- package/lib/profile/company/finances/billing/bill.entity.js +338 -0
- package/lib/profile/company/finances/billing/bill.entity.js.map +1 -0
- package/lib/profile/company/finances/billing/item.entity.d.ts +75 -0
- package/lib/profile/company/finances/billing/item.entity.js +219 -0
- package/lib/profile/company/finances/billing/item.entity.js.map +1 -0
- package/lib/profile/company/finances/billing/transaction.entity.d.ts +44 -0
- package/lib/profile/company/finances/billing/transaction.entity.js +158 -0
- package/lib/profile/company/finances/billing/transaction.entity.js.map +1 -0
- package/lib/profile/company/finances/expense/category.entity.d.ts +55 -0
- package/lib/profile/company/finances/expense/category.entity.js +117 -0
- package/lib/profile/company/finances/expense/category.entity.js.map +1 -0
- package/lib/profile/company/finances/expense/expense.entity.d.ts +48 -0
- package/lib/profile/company/finances/expense/expense.entity.js +171 -0
- package/lib/profile/company/finances/expense/expense.entity.js.map +1 -0
- package/lib/profile/company/finances/handover/handover.entity.d.ts +44 -0
- package/lib/profile/company/finances/handover/handover.entity.js +202 -0
- package/lib/profile/company/finances/handover/handover.entity.js.map +1 -0
- package/lib/profile/company/finances/invoice/invoice.entity.d.ts +65 -0
- package/lib/profile/company/finances/invoice/invoice.entity.js +296 -0
- package/lib/profile/company/finances/invoice/invoice.entity.js.map +1 -0
- package/lib/profile/company/finances/invoice/item.entity.d.ts +25 -0
- package/lib/profile/company/finances/invoice/item.entity.js +148 -0
- package/lib/profile/company/finances/invoice/item.entity.js.map +1 -0
- package/lib/profile/company/finances/payment/method.entity.d.ts +35 -0
- package/lib/profile/company/finances/payment/method.entity.js +143 -0
- package/lib/profile/company/finances/payment/method.entity.js.map +1 -0
- package/lib/profile/company/finances/peyment/method.entity.d.ts +35 -0
- package/lib/profile/company/finances/peyment/method.entity.js +143 -0
- package/lib/profile/company/finances/peyment/method.entity.js.map +1 -0
- package/lib/profile/company/finances/peyment-method/payment-method.d.ts +34 -0
- package/lib/profile/company/finances/peyment-method/payment-method.js +118 -0
- package/lib/profile/company/finances/peyment-method/payment-method.js.map +1 -0
- package/lib/profile/company/instructor/instructor.entity.d.ts +85 -0
- package/lib/profile/company/instructor/instructor.entity.js +254 -0
- package/lib/profile/company/instructor/instructor.entity.js.map +1 -0
- package/lib/profile/company/instructor/task.entity.d.ts +60 -0
- package/lib/profile/company/instructor/task.entity.js +133 -0
- package/lib/profile/company/instructor/task.entity.js.map +1 -0
- package/lib/profile/company/medical/examination.entity.d.ts +59 -0
- package/lib/profile/company/medical/examination.entity.js +175 -0
- package/lib/profile/company/medical/examination.entity.js.map +1 -0
- package/lib/profile/company/medical/product.entity.d.ts +99 -0
- package/lib/profile/company/medical/product.entity.js +270 -0
- package/lib/profile/company/medical/product.entity.js.map +1 -0
- package/lib/profile/company/metrics/company.metric.d.ts +21 -0
- package/lib/profile/company/metrics/company.metric.js +122 -0
- package/lib/profile/company/metrics/company.metric.js.map +1 -0
- package/lib/profile/company/product/addon.entity.d.ts +93 -0
- package/lib/profile/company/product/addon.entity.js +234 -0
- package/lib/profile/company/product/addon.entity.js.map +1 -0
- package/lib/profile/company/product/priceplan.entity.d.ts +57 -0
- package/lib/profile/company/product/priceplan.entity.js +167 -0
- package/lib/profile/company/product/priceplan.entity.js.map +1 -0
- package/lib/profile/company/product/product.entity.d.ts +171 -0
- package/lib/profile/company/product/product.entity.js +383 -0
- package/lib/profile/company/product/product.entity.js.map +1 -0
- package/lib/profile/company/product/vehicle.entity.d.ts +46 -0
- package/lib/profile/company/product/vehicle.entity.js +144 -0
- package/lib/profile/company/product/vehicle.entity.js.map +1 -0
- package/lib/profile/instructor/instructor.entity.d.ts +80 -0
- package/lib/profile/instructor/instructor.entity.js +186 -0
- package/lib/profile/instructor/instructor.entity.js.map +1 -0
- package/lib/profile/student/program/licence/licence.entity.d.ts +66 -0
- package/lib/profile/student/program/licence/licence.entity.js +187 -0
- package/lib/profile/student/program/licence/licence.entity.js.map +1 -0
- package/lib/profile/student/program/medical/certificate.entity.d.ts +84 -0
- package/lib/profile/student/program/medical/certificate.entity.js +244 -0
- package/lib/profile/student/program/medical/certificate.entity.js.map +1 -0
- package/lib/profile/student/program/medical/examination.model.d.ts +65 -0
- package/lib/profile/student/program/medical/examination.model.js +209 -0
- package/lib/profile/student/program/medical/examination.model.js.map +1 -0
- package/lib/profile/student/program/program.entity.d.ts +78 -0
- package/lib/profile/student/program/program.entity.js +225 -0
- package/lib/profile/student/program/program.entity.js.map +1 -0
- package/lib/profile/student/program/training/appointment.entity.d.ts +151 -0
- package/lib/profile/student/program/training/appointment.entity.js +441 -0
- package/lib/profile/student/program/training/appointment.entity.js.map +1 -0
- package/lib/profile/student/program/training/exam.entity.d.ts +41 -0
- package/lib/profile/student/program/training/exam.entity.js +141 -0
- package/lib/profile/student/program/training/exam.entity.js.map +1 -0
- package/lib/profile/student/program/training/lesson.entity.d.ts +84 -0
- package/lib/profile/student/program/training/lesson.entity.js +221 -0
- package/lib/profile/student/program/training/lesson.entity.js.map +1 -0
- package/lib/profile/student/program/training/request.entity.d.ts +56 -0
- package/lib/profile/student/program/training/request.entity.js +159 -0
- package/lib/profile/student/program/training/request.entity.js.map +1 -0
- package/lib/profile/student/program/training/topic.entity.d.ts +109 -0
- package/lib/profile/student/program/training/topic.entity.js +255 -0
- package/lib/profile/student/program/training/topic.entity.js.map +1 -0
- package/lib/profile/student/program/training/training.entity.d.ts +167 -0
- package/lib/profile/student/program/training/training.entity.js +501 -0
- package/lib/profile/student/program/training/training.entity.js.map +1 -0
- package/lib/profile/student/program/training/transaction.entity.d.ts +111 -0
- package/lib/profile/student/program/training/transaction.entity.js +266 -0
- package/lib/profile/student/program/training/transaction.entity.js.map +1 -0
- package/lib/profile/student/student.entity.d.ts +89 -0
- package/lib/profile/student/student.entity.js +183 -0
- package/lib/profile/student/student.entity.js.map +1 -0
- package/lib/system/campaign/campaign.entity.d.ts +68 -0
- package/lib/system/campaign/campaign.entity.js +150 -0
- package/lib/system/campaign/campaign.entity.js.map +1 -0
- package/lib/system/campaign/gifcode.entity.d.ts +14 -0
- package/lib/system/campaign/gifcode.entity.js +77 -0
- package/lib/system/campaign/gifcode.entity.js.map +1 -0
- package/lib/system/campaigne/campaign.entity.d.ts +69 -0
- package/lib/system/campaigne/campaign.entity.js +179 -0
- package/lib/system/campaigne/campaign.entity.js.map +1 -0
- package/lib/system/campaigne/gifcode.entity.d.ts +54 -0
- package/lib/system/campaigne/gifcode.entity.js +126 -0
- package/lib/system/campaigne/gifcode.entity.js.map +1 -0
- package/lib/system/country/country.entity.d.ts +121 -0
- package/lib/system/country/country.entity.js +284 -0
- package/lib/system/country/country.entity.js.map +1 -0
- package/lib/system/country/country.metric.d.ts +12 -0
- package/lib/system/country/country.metric.js +68 -0
- package/lib/system/country/country.metric.js.map +1 -0
- package/lib/system/currency/currency.entity.d.ts +46 -0
- package/lib/system/currency/currency.entity.js +112 -0
- package/lib/system/currency/currency.entity.js.map +1 -0
- package/lib/system/driving/category.entity.d.ts +146 -0
- package/lib/system/driving/category.entity.js +321 -0
- package/lib/system/driving/category.entity.js.map +1 -0
- package/lib/system/driving/vehicle.entity.d.ts +54 -0
- package/lib/system/driving/vehicle.entity.js +130 -0
- package/lib/system/driving/vehicle.entity.js.map +1 -0
- package/lib/system/event/business.entity.d.ts +75 -0
- package/lib/system/event/business.entity.js +170 -0
- package/lib/system/event/business.entity.js.map +1 -0
- package/lib/system/event/log.entity.d.ts +103 -0
- package/lib/system/event/log.entity.js +202 -0
- package/lib/system/event/log.entity.js.map +1 -0
- package/lib/system/policy/policy.entity.d.ts +90 -0
- package/lib/system/policy/policy.entity.js +226 -0
- package/lib/system/policy/policy.entity.js.map +1 -0
- package/lib/system/staff/staff.entity.d.ts +72 -0
- package/lib/system/staff/staff.entity.js +186 -0
- package/lib/system/staff/staff.entity.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/user/alert.entity.d.ts +95 -0
- package/lib/user/alert.entity.js +223 -0
- package/lib/user/alert.entity.js.map +1 -0
- package/lib/user/blocked.entity.d.ts +42 -0
- package/lib/user/blocked.entity.js +83 -0
- package/lib/user/blocked.entity.js.map +1 -0
- package/lib/user/device.entity.d.ts +72 -0
- package/lib/user/device.entity.js +182 -0
- package/lib/user/device.entity.js.map +1 -0
- package/lib/user/notification.entity.d.ts +87 -0
- package/lib/user/notification.entity.js +219 -0
- package/lib/user/notification.entity.js.map +1 -0
- package/lib/user/ticket.entity.d.ts +85 -0
- package/lib/user/ticket.entity.js +231 -0
- package/lib/user/ticket.entity.js.map +1 -0
- package/lib/user/user.entity.d.ts +235 -0
- package/lib/user/user.entity.js +573 -0
- package/lib/user/user.entity.js.map +1 -0
- package/lib/user/verification.entity.d.ts +75 -0
- package/lib/user/verification.entity.js +142 -0
- package/lib/user/verification.entity.js.map +1 -0
- package/lib/utils/activity.helper.d.ts +26 -0
- package/lib/utils/activity.helper.js +39 -0
- package/lib/utils/activity.helper.js.map +1 -0
- package/lib/utils/index.d.ts +4 -0
- package/lib/utils/index.js +21 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/json-metrics.transform.d.ts +35 -0
- package/lib/utils/json-metrics.transform.js +83 -0
- package/lib/utils/json-metrics.transform.js.map +1 -0
- package/lib/utils/numeric.transform.d.ts +38 -0
- package/lib/utils/numeric.transform.js +74 -0
- package/lib/utils/numeric.transform.js.map +1 -0
- package/lib/utils/trackable.entity.d.ts +82 -0
- package/lib/utils/trackable.entity.js +100 -0
- package/lib/utils/trackable.entity.js.map +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,185 @@
|
|
|
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.SeedCourseTopicEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const typeorm_2 = require("typeorm");
|
|
15
|
+
const nestjs_i18n_1 = require("nestjs-i18n");
|
|
16
|
+
const common_1 = require("@driveup/common");
|
|
17
|
+
const common_2 = require("@driveup/common");
|
|
18
|
+
const lesson_entity_1 = require("./lesson.entity");
|
|
19
|
+
const staff_entity_1 = require("../../../system/staff/staff.entity");
|
|
20
|
+
const utils_1 = require("../../../utils");
|
|
21
|
+
/**
|
|
22
|
+
* Represents a topic within a lesson.
|
|
23
|
+
* Topics are the smallest learning units that define specific skills and knowledge areas.
|
|
24
|
+
* Each topic belongs to a lesson and can include multiple skills that students will acquire.
|
|
25
|
+
*
|
|
26
|
+
* @extends TrackableEntity<Topic>
|
|
27
|
+
*/
|
|
28
|
+
let SeedCourseTopicEntity = class SeedCourseTopicEntity extends utils_1.TrackableEntity {
|
|
29
|
+
/**
|
|
30
|
+
* Reference to the lesson this topic belongs to
|
|
31
|
+
*/
|
|
32
|
+
lessonId;
|
|
33
|
+
/**
|
|
34
|
+
* Localized content for the topic (title, description, etc.)
|
|
35
|
+
*/
|
|
36
|
+
translations;
|
|
37
|
+
/**
|
|
38
|
+
* URL to the topic's representative image
|
|
39
|
+
*/
|
|
40
|
+
imageUrl;
|
|
41
|
+
/**
|
|
42
|
+
* List of skills covered in this topic
|
|
43
|
+
* Skills define what students will learn and can be localized
|
|
44
|
+
*/
|
|
45
|
+
skills;
|
|
46
|
+
/**
|
|
47
|
+
* Sort order for displaying topics within a lesson
|
|
48
|
+
*/
|
|
49
|
+
sort;
|
|
50
|
+
/**
|
|
51
|
+
* Reference to the parent lesson
|
|
52
|
+
*/
|
|
53
|
+
lesson;
|
|
54
|
+
/**
|
|
55
|
+
* Creates a new SeedCourseTopicEntity instance
|
|
56
|
+
* @param props - Partial properties to initialize the entity
|
|
57
|
+
*/
|
|
58
|
+
constructor(props) {
|
|
59
|
+
super();
|
|
60
|
+
Object.assign(this, props);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Converts the entity to a Topic model instance
|
|
64
|
+
* @param lang - Optional language for translations
|
|
65
|
+
* @returns Topic model with localized content
|
|
66
|
+
*/
|
|
67
|
+
toModel(lang) {
|
|
68
|
+
const translation = this.getTranslation(lang);
|
|
69
|
+
return new common_2.Topic({
|
|
70
|
+
id: this.id,
|
|
71
|
+
title: translation?.title,
|
|
72
|
+
description: translation?.description,
|
|
73
|
+
imageUrl: translation?.imageUrl || this.imageUrl,
|
|
74
|
+
sort: this.sort
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Converts the entity to a Topic model instance
|
|
79
|
+
* @param lang - Optional language for translations
|
|
80
|
+
* @returns Topic model with localized content
|
|
81
|
+
*/
|
|
82
|
+
toSummary(lang) {
|
|
83
|
+
return this.toModel(lang);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Gets the localized skills for this topic
|
|
87
|
+
* @param lang - Optional language code; defaults to current i18n context
|
|
88
|
+
* @returns Array of Skill instances filtered by language
|
|
89
|
+
*/
|
|
90
|
+
getSkills(lang) {
|
|
91
|
+
const language = lang || nestjs_i18n_1.I18nContext.current()?.lang;
|
|
92
|
+
return this.skills?.filter(s => s.language === language).map(s => new common_2.Skill({
|
|
93
|
+
id: s.id,
|
|
94
|
+
title: s.title,
|
|
95
|
+
sort: s.sort
|
|
96
|
+
}));
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Gets the localized translation for the topic
|
|
100
|
+
* @param lang - Optional language code; defaults to current i18n context
|
|
101
|
+
* @returns Content instance with translated title and description
|
|
102
|
+
*/
|
|
103
|
+
getTranslation(lang) {
|
|
104
|
+
const language = lang || nestjs_i18n_1.I18nContext.current()?.lang;
|
|
105
|
+
const translation = this.translations?.find(t => t.language === language);
|
|
106
|
+
return new common_1.Content({
|
|
107
|
+
title: translation?.title,
|
|
108
|
+
description: translation?.description,
|
|
109
|
+
content: translation?.content,
|
|
110
|
+
imageUrl: translation?.imageUrl,
|
|
111
|
+
link: translation?.link,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Gets all available translations for the topic
|
|
116
|
+
* @returns Array of Content instances for all languages
|
|
117
|
+
*/
|
|
118
|
+
getTranslations() {
|
|
119
|
+
return this.translations?.map(t => new common_1.Content({
|
|
120
|
+
title: t.title,
|
|
121
|
+
description: t.description,
|
|
122
|
+
content: t.content,
|
|
123
|
+
imageUrl: t.imageUrl,
|
|
124
|
+
link: t.link,
|
|
125
|
+
language: t.language
|
|
126
|
+
}));
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Retrieves activity history for this topic
|
|
130
|
+
* @returns Promise resolving to array of Activity instances tracking creation and updates
|
|
131
|
+
*/
|
|
132
|
+
async getActivities() {
|
|
133
|
+
const activities = [];
|
|
134
|
+
activities.push(await (0, utils_1.toActivity)(this.createdBy, common_1.ActivityType.createdBy, staff_entity_1.StaffEntity));
|
|
135
|
+
activities.push(await (0, utils_1.toActivity)(this.createdOn, common_1.ActivityType.createdOn));
|
|
136
|
+
activities.push(await (0, utils_1.toActivity)(this.updatedBy, common_1.ActivityType.updatedBy, staff_entity_1.StaffEntity));
|
|
137
|
+
activities.push(await (0, utils_1.toActivity)(this.updatedOn, common_1.ActivityType.updatedOn));
|
|
138
|
+
return activities.filter(a => a);
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
exports.SeedCourseTopicEntity = SeedCourseTopicEntity;
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, typeorm_1.Column)(),
|
|
144
|
+
__metadata("design:type", Number)
|
|
145
|
+
], SeedCourseTopicEntity.prototype, "lessonId", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, typeorm_1.Column)({
|
|
148
|
+
type: 'simple-json',
|
|
149
|
+
nullable: true,
|
|
150
|
+
default: null
|
|
151
|
+
}),
|
|
152
|
+
__metadata("design:type", Array)
|
|
153
|
+
], SeedCourseTopicEntity.prototype, "translations", void 0);
|
|
154
|
+
__decorate([
|
|
155
|
+
(0, typeorm_1.Column)({
|
|
156
|
+
nullable: true,
|
|
157
|
+
default: null
|
|
158
|
+
}),
|
|
159
|
+
__metadata("design:type", String)
|
|
160
|
+
], SeedCourseTopicEntity.prototype, "imageUrl", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
(0, typeorm_1.Column)({
|
|
163
|
+
type: 'json',
|
|
164
|
+
nullable: true,
|
|
165
|
+
default: null
|
|
166
|
+
}),
|
|
167
|
+
__metadata("design:type", Array)
|
|
168
|
+
], SeedCourseTopicEntity.prototype, "skills", void 0);
|
|
169
|
+
__decorate([
|
|
170
|
+
(0, typeorm_1.Column)({
|
|
171
|
+
type: 'tinyint',
|
|
172
|
+
nullable: true,
|
|
173
|
+
default: null
|
|
174
|
+
}),
|
|
175
|
+
__metadata("design:type", Number)
|
|
176
|
+
], SeedCourseTopicEntity.prototype, "sort", void 0);
|
|
177
|
+
__decorate([
|
|
178
|
+
(0, typeorm_2.ManyToOne)(() => lesson_entity_1.SeedCourseLessonEntity, lesson => lesson.topics),
|
|
179
|
+
__metadata("design:type", Promise)
|
|
180
|
+
], SeedCourseTopicEntity.prototype, "lesson", void 0);
|
|
181
|
+
exports.SeedCourseTopicEntity = SeedCourseTopicEntity = __decorate([
|
|
182
|
+
(0, typeorm_1.Entity)('seedCourseTopics'),
|
|
183
|
+
__metadata("design:paramtypes", [Object])
|
|
184
|
+
], SeedCourseTopicEntity);
|
|
185
|
+
//# sourceMappingURL=topic.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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BAAqB;IADjC,IAAA,gBAAM,EAAC,kBAAkB,CAAC;;GACd,qBAAqB,CAoJjC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Activity, Category, Content, Language } from '@driveup/common';
|
|
2
|
+
import { TrackableEntity } from '../../../utils';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a seed expense category template in the system.
|
|
5
|
+
* Expense categories are predefined classifications for company expenses
|
|
6
|
+
* that help organize and track financial transactions.
|
|
7
|
+
* Companies can use these templates when setting up their expense tracking.
|
|
8
|
+
*
|
|
9
|
+
* @extends TrackableEntity<Category>
|
|
10
|
+
*/
|
|
11
|
+
export declare class SeedExpenseCategoryEntity extends TrackableEntity<Category> {
|
|
12
|
+
/**
|
|
13
|
+
* Localized content for the category (title, description, etc.) across different languages
|
|
14
|
+
*/
|
|
15
|
+
translations: Content[];
|
|
16
|
+
/**
|
|
17
|
+
* Internal name identifier for the category
|
|
18
|
+
*/
|
|
19
|
+
name: string;
|
|
20
|
+
/**
|
|
21
|
+
* URL to the category's representative image/icon
|
|
22
|
+
*/
|
|
23
|
+
imageUrl: string;
|
|
24
|
+
/**
|
|
25
|
+
* Sort order for displaying categories
|
|
26
|
+
*/
|
|
27
|
+
sort: number;
|
|
28
|
+
/**
|
|
29
|
+
* Creates a new SeedExpenseCategoryEntity instance
|
|
30
|
+
* @param props - Partial properties to initialize the entity
|
|
31
|
+
*/
|
|
32
|
+
constructor(props?: Partial<SeedExpenseCategoryEntity>);
|
|
33
|
+
/**
|
|
34
|
+
* Converts the entity to a Category model instance
|
|
35
|
+
* @param lang - Language for translations
|
|
36
|
+
* @returns Category model with localized content
|
|
37
|
+
*/
|
|
38
|
+
toModel(lang: Language): Category;
|
|
39
|
+
/**
|
|
40
|
+
* Converts the entity to a Category model instance
|
|
41
|
+
* @param lang - Language for translations
|
|
42
|
+
* @returns Category model with localized content
|
|
43
|
+
*/
|
|
44
|
+
toSummary(lang?: Language): Category;
|
|
45
|
+
/**
|
|
46
|
+
* Gets the localized translation for the category
|
|
47
|
+
* @param lang - Optional language code; defaults to current i18n context
|
|
48
|
+
* @returns Content instance with translated title and description
|
|
49
|
+
*/
|
|
50
|
+
getTranslation(lang?: Language): Content;
|
|
51
|
+
/**
|
|
52
|
+
* Gets all available translations for the category
|
|
53
|
+
* @returns Array of Content instances for all languages
|
|
54
|
+
*/
|
|
55
|
+
getTranslations(): Content[];
|
|
56
|
+
/**
|
|
57
|
+
* Retrieves activity history for this category
|
|
58
|
+
* @returns Promise resolving to array of Activity instances tracking creation and updates
|
|
59
|
+
*/
|
|
60
|
+
getActivities(): Promise<Activity[]>;
|
|
61
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
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.SeedExpenseCategoryEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const nestjs_i18n_1 = require("nestjs-i18n");
|
|
15
|
+
const common_1 = require("@driveup/common");
|
|
16
|
+
const staff_entity_1 = require("../../../system/staff/staff.entity");
|
|
17
|
+
const utils_1 = require("../../../utils");
|
|
18
|
+
/**
|
|
19
|
+
* Represents a seed expense category template in the system.
|
|
20
|
+
* Expense categories are predefined classifications for company expenses
|
|
21
|
+
* that help organize and track financial transactions.
|
|
22
|
+
* Companies can use these templates when setting up their expense tracking.
|
|
23
|
+
*
|
|
24
|
+
* @extends TrackableEntity<Category>
|
|
25
|
+
*/
|
|
26
|
+
let SeedExpenseCategoryEntity = class SeedExpenseCategoryEntity extends utils_1.TrackableEntity {
|
|
27
|
+
/**
|
|
28
|
+
* Localized content for the category (title, description, etc.) across different languages
|
|
29
|
+
*/
|
|
30
|
+
translations;
|
|
31
|
+
/**
|
|
32
|
+
* Internal name identifier for the category
|
|
33
|
+
*/
|
|
34
|
+
name;
|
|
35
|
+
/**
|
|
36
|
+
* URL to the category's representative image/icon
|
|
37
|
+
*/
|
|
38
|
+
imageUrl;
|
|
39
|
+
/**
|
|
40
|
+
* Sort order for displaying categories
|
|
41
|
+
*/
|
|
42
|
+
sort;
|
|
43
|
+
/**
|
|
44
|
+
* Creates a new SeedExpenseCategoryEntity instance
|
|
45
|
+
* @param props - Partial properties to initialize the entity
|
|
46
|
+
*/
|
|
47
|
+
constructor(props) {
|
|
48
|
+
super();
|
|
49
|
+
Object.assign(this, props);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Converts the entity to a Category model instance
|
|
53
|
+
* @param lang - Language for translations
|
|
54
|
+
* @returns Category model with localized content
|
|
55
|
+
*/
|
|
56
|
+
toModel(lang) {
|
|
57
|
+
const transaltion = this.getTranslation(lang);
|
|
58
|
+
return new common_1.Category({
|
|
59
|
+
id: this.id,
|
|
60
|
+
name: this.name,
|
|
61
|
+
title: transaltion?.title,
|
|
62
|
+
description: transaltion?.description,
|
|
63
|
+
imageUrl: transaltion?.imageUrl || this.imageUrl,
|
|
64
|
+
sort: this.sort
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Converts the entity to a Category model instance
|
|
69
|
+
* @param lang - Language for translations
|
|
70
|
+
* @returns Category model with localized content
|
|
71
|
+
*/
|
|
72
|
+
toSummary(lang) {
|
|
73
|
+
return this.toModel(lang);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Gets the localized translation for the category
|
|
77
|
+
* @param lang - Optional language code; defaults to current i18n context
|
|
78
|
+
* @returns Content instance with translated title and description
|
|
79
|
+
*/
|
|
80
|
+
getTranslation(lang) {
|
|
81
|
+
const language = lang || nestjs_i18n_1.I18nContext.current()?.lang;
|
|
82
|
+
const translation = this.translations?.find(t => t.language === language);
|
|
83
|
+
return new common_1.Content({
|
|
84
|
+
title: translation?.title,
|
|
85
|
+
description: translation?.description,
|
|
86
|
+
content: translation?.content,
|
|
87
|
+
imageUrl: translation?.imageUrl,
|
|
88
|
+
link: translation?.link,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Gets all available translations for the category
|
|
93
|
+
* @returns Array of Content instances for all languages
|
|
94
|
+
*/
|
|
95
|
+
getTranslations() {
|
|
96
|
+
return this.translations?.map(t => new common_1.Content({
|
|
97
|
+
title: t.title,
|
|
98
|
+
description: t.description,
|
|
99
|
+
content: t.content,
|
|
100
|
+
imageUrl: t.imageUrl,
|
|
101
|
+
link: t.link,
|
|
102
|
+
language: t.language
|
|
103
|
+
}));
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Retrieves activity history for this category
|
|
107
|
+
* @returns Promise resolving to array of Activity instances tracking creation and updates
|
|
108
|
+
*/
|
|
109
|
+
async getActivities() {
|
|
110
|
+
const activities = [];
|
|
111
|
+
activities.push(await (0, utils_1.toActivity)(this.createdBy, common_1.ActivityType.createdBy, staff_entity_1.StaffEntity));
|
|
112
|
+
activities.push(await (0, utils_1.toActivity)(this.createdOn, common_1.ActivityType.createdOn));
|
|
113
|
+
activities.push(await (0, utils_1.toActivity)(this.updatedBy, common_1.ActivityType.updatedBy, staff_entity_1.StaffEntity));
|
|
114
|
+
activities.push(await (0, utils_1.toActivity)(this.updatedOn, common_1.ActivityType.updatedOn));
|
|
115
|
+
return activities.filter(a => a);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
exports.SeedExpenseCategoryEntity = SeedExpenseCategoryEntity;
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, typeorm_1.Column)({
|
|
121
|
+
type: 'simple-json',
|
|
122
|
+
nullable: true,
|
|
123
|
+
default: null
|
|
124
|
+
}),
|
|
125
|
+
__metadata("design:type", Array)
|
|
126
|
+
], SeedExpenseCategoryEntity.prototype, "translations", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
(0, typeorm_1.Column)({
|
|
129
|
+
nullable: true,
|
|
130
|
+
default: null
|
|
131
|
+
}),
|
|
132
|
+
__metadata("design:type", String)
|
|
133
|
+
], SeedExpenseCategoryEntity.prototype, "name", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, typeorm_1.Column)({
|
|
136
|
+
nullable: true,
|
|
137
|
+
default: null
|
|
138
|
+
}),
|
|
139
|
+
__metadata("design:type", String)
|
|
140
|
+
], SeedExpenseCategoryEntity.prototype, "imageUrl", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
(0, typeorm_1.Column)({
|
|
143
|
+
type: 'tinyint',
|
|
144
|
+
nullable: true,
|
|
145
|
+
default: null
|
|
146
|
+
}),
|
|
147
|
+
__metadata("design:type", Number)
|
|
148
|
+
], SeedExpenseCategoryEntity.prototype, "sort", void 0);
|
|
149
|
+
exports.SeedExpenseCategoryEntity = SeedExpenseCategoryEntity = __decorate([
|
|
150
|
+
(0, typeorm_1.Entity)('seedExpenseCategories'),
|
|
151
|
+
__metadata("design:paramtypes", [Object])
|
|
152
|
+
], SeedExpenseCategoryEntity);
|
|
153
|
+
//# sourceMappingURL=category.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category.entity.js","sourceRoot":"","sources":["../../../../src/catalog/seed/expense/category.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAyC;AACzC,6CAA0C;AAC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AAM,EAAC;QACP,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;+DACsB;AASxB;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;uDACW;AASb;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;2DACe;AAUjB;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;uDACW;oCAtCD,yBAAyB;IADrC,IAAA,gBAAM,EAAC,uBAAuB,CAAC;;GACnB,yBAAyB,CAuHrC"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export * from './catalog/addon/addon.entity';
|
|
2
|
+
export * from './catalog/addon/country.entity';
|
|
3
|
+
export * from './catalog/priceplan/priceplan.entity';
|
|
4
|
+
export * from './catalog/product/country.entity';
|
|
5
|
+
export * from './catalog/product/priceplan.entity';
|
|
6
|
+
export * from './catalog/product/product.entity';
|
|
7
|
+
export * from './catalog/program/program.entity';
|
|
8
|
+
export * from './catalog/seed/assets/asset.entity';
|
|
9
|
+
export * from './catalog/seed/courses/course.entity';
|
|
10
|
+
export * from './catalog/seed/courses/lesson.entity';
|
|
11
|
+
export * from './catalog/seed/courses/topic.entity';
|
|
12
|
+
export * from './catalog/seed/expense/category.entity';
|
|
13
|
+
export * from './profile/agent/agent.entity';
|
|
14
|
+
export * from './profile/agent/payout.entity';
|
|
15
|
+
export * from './profile/agent/promotion.entity';
|
|
16
|
+
export * from './profile/company/course/appointment.entity';
|
|
17
|
+
export * from './profile/company/course/course.entity';
|
|
18
|
+
export * from './profile/company/course/lesson.entity';
|
|
19
|
+
export * from './profile/company/course/topic.entity';
|
|
20
|
+
export * from './profile/company/finances/billing/bill.entity';
|
|
21
|
+
export * from './profile/company/finances/billing/item.entity';
|
|
22
|
+
export * from './profile/company/finances/billing/transaction.entity';
|
|
23
|
+
export * from './profile/company/finances/expense/category.entity';
|
|
24
|
+
export * from './profile/company/finances/expense/expense.entity';
|
|
25
|
+
export * from './profile/company/finances/handover/handover.entity';
|
|
26
|
+
export * from './profile/company/finances/invoice/invoice.entity';
|
|
27
|
+
export * from './profile/company/finances/invoice/item.entity';
|
|
28
|
+
export * from './profile/company/finances/payment/method.entity';
|
|
29
|
+
export * from './profile/company/instructor/instructor.entity';
|
|
30
|
+
export * from './profile/company/instructor/task.entity';
|
|
31
|
+
export * from './profile/company/medical/examination.entity';
|
|
32
|
+
export * from './profile/company/medical/product.entity';
|
|
33
|
+
export * from './profile/company/product/addon.entity';
|
|
34
|
+
export * from './profile/company/product/priceplan.entity';
|
|
35
|
+
export * from './profile/company/product/product.entity';
|
|
36
|
+
export * from './profile/company/product/vehicle.entity';
|
|
37
|
+
export * from './profile/company/company.entity';
|
|
38
|
+
export * from './profile/instructor/instructor.entity';
|
|
39
|
+
export * from './profile/student/program/licence/licence.entity';
|
|
40
|
+
export * from './profile/student/program/medical/certificate.entity';
|
|
41
|
+
export * from './profile/student/program/medical/examination.model';
|
|
42
|
+
export * from './profile/student/program/training/appointment.entity';
|
|
43
|
+
export * from './profile/student/program/training/exam.entity';
|
|
44
|
+
export * from './profile/student/program/training/lesson.entity';
|
|
45
|
+
export * from './profile/student/program/training/request.entity';
|
|
46
|
+
export * from './profile/student/program/training/topic.entity';
|
|
47
|
+
export * from './profile/student/program/training/training.entity';
|
|
48
|
+
export * from './profile/student/program/training/transaction.entity';
|
|
49
|
+
export * from './profile/student/program/program.entity';
|
|
50
|
+
export * from './profile/student/student.entity';
|
|
51
|
+
export * from './system/campaigne/campaign.entity';
|
|
52
|
+
export * from './system/campaigne/gifcode.entity';
|
|
53
|
+
export * from './system/country/country.entity';
|
|
54
|
+
export * from './system/currency/currency.entity';
|
|
55
|
+
export * from './system/driving/category.entity';
|
|
56
|
+
export * from './system/driving/vehicle.entity';
|
|
57
|
+
export * from './system/event/business.entity';
|
|
58
|
+
export * from './system/event/log.entity';
|
|
59
|
+
export * from './system/policy/policy.entity';
|
|
60
|
+
export * from './system/staff/staff.entity';
|
|
61
|
+
export * from './user/alert.entity';
|
|
62
|
+
export * from './user/blocked.entity';
|
|
63
|
+
export * from './user/device.entity';
|
|
64
|
+
export * from './user/notification.entity';
|
|
65
|
+
export * from './user/ticket.entity';
|
|
66
|
+
export * from './user/user.entity';
|
|
67
|
+
export * from './user/verification.entity';
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// catalog
|
|
18
|
+
__exportStar(require("./catalog/addon/addon.entity"), exports);
|
|
19
|
+
__exportStar(require("./catalog/addon/country.entity"), exports);
|
|
20
|
+
__exportStar(require("./catalog/priceplan/priceplan.entity"), exports);
|
|
21
|
+
__exportStar(require("./catalog/product/country.entity"), exports);
|
|
22
|
+
__exportStar(require("./catalog/product/priceplan.entity"), exports);
|
|
23
|
+
__exportStar(require("./catalog/product/product.entity"), exports);
|
|
24
|
+
__exportStar(require("./catalog/program/program.entity"), exports);
|
|
25
|
+
__exportStar(require("./catalog/seed/assets/asset.entity"), exports);
|
|
26
|
+
__exportStar(require("./catalog/seed/courses/course.entity"), exports);
|
|
27
|
+
__exportStar(require("./catalog/seed/courses/lesson.entity"), exports);
|
|
28
|
+
__exportStar(require("./catalog/seed/courses/topic.entity"), exports);
|
|
29
|
+
__exportStar(require("./catalog/seed/expense/category.entity"), exports);
|
|
30
|
+
// profile: agent
|
|
31
|
+
__exportStar(require("./profile/agent/agent.entity"), exports);
|
|
32
|
+
__exportStar(require("./profile/agent/payout.entity"), exports);
|
|
33
|
+
__exportStar(require("./profile/agent/promotion.entity"), exports);
|
|
34
|
+
// profile: company
|
|
35
|
+
__exportStar(require("./profile/company/course/appointment.entity"), exports);
|
|
36
|
+
__exportStar(require("./profile/company/course/course.entity"), exports);
|
|
37
|
+
__exportStar(require("./profile/company/course/lesson.entity"), exports);
|
|
38
|
+
__exportStar(require("./profile/company/course/topic.entity"), exports);
|
|
39
|
+
__exportStar(require("./profile/company/finances/billing/bill.entity"), exports);
|
|
40
|
+
__exportStar(require("./profile/company/finances/billing/item.entity"), exports);
|
|
41
|
+
__exportStar(require("./profile/company/finances/billing/transaction.entity"), exports);
|
|
42
|
+
__exportStar(require("./profile/company/finances/expense/category.entity"), exports);
|
|
43
|
+
__exportStar(require("./profile/company/finances/expense/expense.entity"), exports);
|
|
44
|
+
__exportStar(require("./profile/company/finances/handover/handover.entity"), exports);
|
|
45
|
+
__exportStar(require("./profile/company/finances/invoice/invoice.entity"), exports);
|
|
46
|
+
__exportStar(require("./profile/company/finances/invoice/item.entity"), exports);
|
|
47
|
+
__exportStar(require("./profile/company/finances/payment/method.entity"), exports);
|
|
48
|
+
__exportStar(require("./profile/company/instructor/instructor.entity"), exports);
|
|
49
|
+
__exportStar(require("./profile/company/instructor/task.entity"), exports);
|
|
50
|
+
__exportStar(require("./profile/company/medical/examination.entity"), exports);
|
|
51
|
+
__exportStar(require("./profile/company/medical/product.entity"), exports);
|
|
52
|
+
__exportStar(require("./profile/company/product/addon.entity"), exports);
|
|
53
|
+
__exportStar(require("./profile/company/product/priceplan.entity"), exports);
|
|
54
|
+
__exportStar(require("./profile/company/product/product.entity"), exports);
|
|
55
|
+
__exportStar(require("./profile/company/product/vehicle.entity"), exports);
|
|
56
|
+
__exportStar(require("./profile/company/company.entity"), exports);
|
|
57
|
+
// profile: instructor
|
|
58
|
+
__exportStar(require("./profile/instructor/instructor.entity"), exports);
|
|
59
|
+
__exportStar(require("./profile/student/program/licence/licence.entity"), exports);
|
|
60
|
+
__exportStar(require("./profile/student/program/medical/certificate.entity"), exports);
|
|
61
|
+
__exportStar(require("./profile/student/program/medical/examination.model"), exports);
|
|
62
|
+
__exportStar(require("./profile/student/program/training/appointment.entity"), exports);
|
|
63
|
+
__exportStar(require("./profile/student/program/training/exam.entity"), exports);
|
|
64
|
+
__exportStar(require("./profile/student/program/training/lesson.entity"), exports);
|
|
65
|
+
__exportStar(require("./profile/student/program/training/request.entity"), exports);
|
|
66
|
+
__exportStar(require("./profile/student/program/training/topic.entity"), exports);
|
|
67
|
+
__exportStar(require("./profile/student/program/training/training.entity"), exports);
|
|
68
|
+
__exportStar(require("./profile/student/program/training/transaction.entity"), exports);
|
|
69
|
+
__exportStar(require("./profile/student/program/program.entity"), exports);
|
|
70
|
+
__exportStar(require("./profile/student/student.entity"), exports);
|
|
71
|
+
// system
|
|
72
|
+
__exportStar(require("./system/campaigne/campaign.entity"), exports);
|
|
73
|
+
__exportStar(require("./system/campaigne/gifcode.entity"), exports);
|
|
74
|
+
__exportStar(require("./system/country/country.entity"), exports);
|
|
75
|
+
__exportStar(require("./system/currency/currency.entity"), exports);
|
|
76
|
+
__exportStar(require("./system/driving/category.entity"), exports);
|
|
77
|
+
__exportStar(require("./system/driving/vehicle.entity"), exports);
|
|
78
|
+
__exportStar(require("./system/event/business.entity"), exports);
|
|
79
|
+
__exportStar(require("./system/event/log.entity"), exports);
|
|
80
|
+
__exportStar(require("./system/policy/policy.entity"), exports);
|
|
81
|
+
__exportStar(require("./system/staff/staff.entity"), exports);
|
|
82
|
+
__exportStar(require("./user/alert.entity"), exports);
|
|
83
|
+
__exportStar(require("./user/blocked.entity"), exports);
|
|
84
|
+
__exportStar(require("./user/device.entity"), exports);
|
|
85
|
+
__exportStar(require("./user/notification.entity"), exports);
|
|
86
|
+
__exportStar(require("./user/ticket.entity"), exports);
|
|
87
|
+
__exportStar(require("./user/user.entity"), exports);
|
|
88
|
+
__exportStar(require("./user/verification.entity"), exports);
|
|
89
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,UAAU;AACV,+DAA6C;AAC7C,iEAA+C;AAC/C,uEAAqD;AACrD,mEAAiD;AACjD,qEAAmD;AACnD,mEAAiD;AACjD,mEAAiD;AACjD,qEAAmD;AACnD,uEAAqD;AACrD,uEAAqD;AACrD,sEAAoD;AACpD,yEAAuD;AACvD,iBAAiB;AACjB,+DAA6C;AAC7C,gEAA8C;AAC9C,mEAAiD;AACjD,mBAAmB;AACnB,8EAA4D;AAC5D,yEAAuD;AACvD,yEAAuD;AACvD,wEAAsD;AACtD,iFAA+D;AAC/D,iFAA+D;AAC/D,wFAAsE;AACtE,qFAAmE;AACnE,oFAAkE;AAClE,sFAAoE;AACpE,oFAAkE;AAClE,iFAA+D;AAC/D,mFAAiE;AACjE,iFAA+D;AAC/D,2EAAyD;AACzD,+EAA6D;AAC7D,2EAAyD;AACzD,yEAAuD;AACvD,6EAA2D;AAC3D,2EAAyD;AACzD,2EAAyD;AACzD,mEAAiD;AACjD,sBAAsB;AACtB,yEAAuD;AACvD,mFAAiE;AACjE,uFAAqE;AACrE,sFAAoE;AACpE,wFAAsE;AACtE,iFAA+D;AAC/D,mFAAiE;AACjE,oFAAkE;AAClE,kFAAgE;AAChE,qFAAmE;AACnE,wFAAsE;AACtE,2EAAyD;AACzD,mEAAiD;AACjD,SAAS;AACT,qEAAmD;AACnD,oEAAkD;AAClD,kEAAgD;AAChD,oEAAkD;AAClD,mEAAiD;AACjD,kEAAgD;AAChD,iEAA+C;AAC/C,4DAA0C;AAC1C,gEAA8C;AAC9C,8DAA4C;AAC5C,sDAAoC;AACpC,wDAAsC;AACtC,uDAAqC;AACrC,6DAA2C;AAC3C,uDAAqC;AACrC,qDAAmC;AACnC,6DAA2C"}
|