@driveup/schema 0.2.6 → 0.2.7
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 +3 -3
- package/lib/catalog/addon/addon.entity.js +5 -5
- package/lib/catalog/addon/addon.entity.js.map +1 -1
- package/lib/catalog/addon/country.entity.d.ts +3 -3
- package/lib/catalog/addon/country.entity.js +5 -5
- package/lib/catalog/addon/country.entity.js.map +1 -1
- package/lib/catalog/priceplan/priceplan.entity.d.ts +2 -2
- package/lib/catalog/priceplan/priceplan.entity.js +4 -4
- package/lib/catalog/priceplan/priceplan.entity.js.map +1 -1
- package/lib/catalog/product/country.entity.d.ts +4 -4
- package/lib/catalog/product/country.entity.js +9 -9
- package/lib/catalog/product/country.entity.js.map +1 -1
- package/lib/catalog/product/priceplan.entity.d.ts +3 -3
- package/lib/catalog/product/priceplan.entity.js +8 -8
- package/lib/catalog/product/priceplan.entity.js.map +1 -1
- package/lib/catalog/product/product.entity.d.ts +3 -3
- package/lib/catalog/product/product.entity.js +6 -6
- package/lib/catalog/product/product.entity.js.map +1 -1
- package/lib/catalog/program/program.entity.d.ts +1 -1
- package/lib/catalog/program/program.entity.js +5 -5
- 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 +4 -4
- package/lib/catalog/seed/assets/asset.entity.js.map +1 -1
- package/lib/catalog/seed/courses/course.entity.d.ts +3 -3
- package/lib/catalog/seed/courses/course.entity.js +7 -7
- 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 +5 -5
- 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 +5 -5
- package/lib/catalog/seed/courses/topic.entity.js.map +1 -1
- package/lib/catalog/seed/expense/category.entity.d.ts +1 -1
- package/lib/catalog/seed/expense/category.entity.js +4 -4
- package/lib/catalog/seed/expense/category.entity.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/profile/agent/agent.entity.d.ts +12 -4
- package/lib/profile/agent/agent.entity.js +30 -6
- package/lib/profile/agent/agent.entity.js.map +1 -1
- package/lib/profile/agent/asset.entity.d.ts +1 -1
- package/lib/profile/agent/asset.entity.js +2 -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 +4 -4
- package/lib/profile/agent/payout.entity.js.map +1 -1
- package/lib/profile/agent/promotion.entity.d.ts +3 -3
- package/lib/profile/agent/promotion.entity.js +6 -6
- package/lib/profile/agent/promotion.entity.js.map +1 -1
- package/lib/profile/company/company.entity.d.ts +39 -8
- package/lib/profile/company/company.entity.js +147 -10
- package/lib/profile/company/company.entity.js.map +1 -1
- package/lib/profile/company/course/course.entity.d.ts +35 -8
- package/lib/profile/company/course/course.entity.js +48 -9
- package/lib/profile/company/course/course.entity.js.map +1 -1
- package/lib/profile/company/course/lesson.entity.d.ts +20 -6
- package/lib/profile/company/course/lesson.entity.js +77 -10
- package/lib/profile/company/course/lesson.entity.js.map +1 -1
- package/lib/profile/company/course/{appointment.entity.d.ts → schedule.entity.d.ts} +78 -8
- package/lib/profile/company/course/{appointment.entity.js → schedule.entity.js} +257 -7
- package/lib/profile/company/course/schedule.entity.js.map +1 -0
- package/lib/profile/company/course/topic.entity.d.ts +6 -2
- package/lib/profile/company/course/topic.entity.js +12 -5
- package/lib/profile/company/course/topic.entity.js.map +1 -1
- package/lib/profile/company/finances/billing/bill.entity.d.ts +3 -3
- package/lib/profile/company/finances/billing/bill.entity.js +5 -5
- package/lib/profile/company/finances/billing/bill.entity.js.map +1 -1
- package/lib/profile/company/finances/billing/item.entity.d.ts +2 -2
- package/lib/profile/company/finances/billing/item.entity.js +5 -5
- package/lib/profile/company/finances/billing/item.entity.js.map +1 -1
- package/lib/profile/company/finances/billing/transaction.entity.d.ts +3 -3
- package/lib/profile/company/finances/billing/transaction.entity.js +6 -6
- package/lib/profile/company/finances/billing/transaction.entity.js.map +1 -1
- package/lib/profile/company/finances/expense/category.entity.d.ts +1 -1
- package/lib/profile/company/finances/expense/category.entity.js +4 -4
- package/lib/profile/company/finances/expense/category.entity.js.map +1 -1
- package/lib/profile/company/finances/expense/expense.entity.d.ts +6 -2
- package/lib/profile/company/finances/expense/expense.entity.js +32 -4
- package/lib/profile/company/finances/expense/expense.entity.js.map +1 -1
- package/lib/profile/company/finances/handover/handover.entity.d.ts +3 -3
- package/lib/profile/company/finances/handover/handover.entity.js +6 -6
- package/lib/profile/company/finances/handover/handover.entity.js.map +1 -1
- package/lib/profile/company/finances/invoice/invoice.entity.d.ts +7 -6
- package/lib/profile/company/finances/invoice/invoice.entity.js +9 -8
- package/lib/profile/company/finances/invoice/invoice.entity.js.map +1 -1
- package/lib/profile/company/finances/invoice/item.entity.d.ts +2 -2
- package/lib/profile/company/finances/invoice/item.entity.js +4 -4
- package/lib/profile/company/finances/invoice/item.entity.js.map +1 -1
- package/lib/profile/company/finances/payment/method.entity.d.ts +10 -4
- package/lib/profile/company/finances/payment/method.entity.js +24 -5
- package/lib/profile/company/finances/payment/method.entity.js.map +1 -1
- package/lib/profile/company/instructor/activity.entity.js.map +1 -1
- package/lib/profile/company/instructor/calendar-state.entity.js.map +1 -1
- package/lib/profile/company/instructor/instructor.entity.d.ts +19 -11
- package/lib/profile/company/instructor/instructor.entity.js +100 -16
- package/lib/profile/company/instructor/instructor.entity.js.map +1 -1
- package/lib/profile/company/instructor/task.entity.d.ts +2 -1
- package/lib/profile/company/instructor/task.entity.js +9 -4
- package/lib/profile/company/instructor/task.entity.js.map +1 -1
- package/lib/profile/company/medical/examination.entity.d.ts +3 -3
- package/lib/profile/company/medical/examination.entity.js +5 -5
- package/lib/profile/company/medical/examination.entity.js.map +1 -1
- package/lib/profile/company/medical/product.entity.d.ts +4 -4
- package/lib/profile/company/medical/product.entity.js +5 -5
- 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 +5 -5
- package/lib/profile/company/product/addon.entity.js.map +1 -1
- package/lib/profile/company/product/priceplan.entity.d.ts +4 -3
- package/lib/profile/company/product/priceplan.entity.js +9 -4
- package/lib/profile/company/product/priceplan.entity.js.map +1 -1
- package/lib/profile/company/product/product.entity.d.ts +8 -7
- package/lib/profile/company/product/product.entity.js +19 -9
- package/lib/profile/company/product/product.entity.js.map +1 -1
- package/lib/profile/company/product/vehicle.entity.d.ts +2 -2
- package/lib/profile/company/product/vehicle.entity.js +4 -4
- package/lib/profile/company/product/vehicle.entity.js.map +1 -1
- package/lib/profile/instructor/instructor.entity.d.ts +6 -3
- package/lib/profile/instructor/instructor.entity.js +28 -7
- package/lib/profile/instructor/instructor.entity.js.map +1 -1
- package/lib/profile/student/program/licence/licence.entity.d.ts +3 -3
- package/lib/profile/student/program/licence/licence.entity.js +5 -5
- 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 +4 -4
- package/lib/profile/student/program/medical/certificate.entity.js.map +1 -1
- package/lib/profile/student/program/medical/examination.entity.d.ts +3 -3
- package/lib/profile/student/program/medical/examination.entity.js +10 -10
- package/lib/profile/student/program/medical/examination.entity.js.map +1 -1
- package/lib/profile/student/program/program.entity.d.ts +6 -6
- package/lib/profile/student/program/program.entity.js +9 -9
- package/lib/profile/student/program/program.entity.js.map +1 -1
- package/lib/profile/student/program/training/appointment.entity.d.ts +21 -9
- package/lib/profile/student/program/training/appointment.entity.js +109 -12
- package/lib/profile/student/program/training/appointment.entity.js.map +1 -1
- package/lib/profile/student/program/training/exam.entity.d.ts +4 -2
- package/lib/profile/student/program/training/exam.entity.js +12 -4
- package/lib/profile/student/program/training/exam.entity.js.map +1 -1
- package/lib/profile/student/program/training/lesson.entity.d.ts +9 -4
- package/lib/profile/student/program/training/lesson.entity.js +29 -7
- package/lib/profile/student/program/training/lesson.entity.js.map +1 -1
- package/lib/profile/student/program/training/request.entity.d.ts +6 -3
- package/lib/profile/student/program/training/request.entity.js +26 -5
- package/lib/profile/student/program/training/request.entity.js.map +1 -1
- package/lib/profile/student/program/training/topic.entity.d.ts +14 -3
- package/lib/profile/student/program/training/topic.entity.js +29 -5
- package/lib/profile/student/program/training/topic.entity.js.map +1 -1
- package/lib/profile/student/program/training/training.entity.d.ts +49 -6
- package/lib/profile/student/program/training/training.entity.js +190 -7
- package/lib/profile/student/program/training/training.entity.js.map +1 -1
- package/lib/profile/student/program/training/transaction.entity.d.ts +8 -3
- package/lib/profile/student/program/training/transaction.entity.js +41 -4
- package/lib/profile/student/program/training/transaction.entity.js.map +1 -1
- package/lib/profile/student/student.entity.d.ts +11 -6
- package/lib/profile/student/student.entity.js +57 -10
- 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 +6 -6
- 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 +6 -6
- 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 +15 -9
- package/lib/system/country/country.entity.js.map +1 -1
- package/lib/system/currency/currency.entity.d.ts +1 -1
- package/lib/system/currency/currency.entity.js +4 -4
- package/lib/system/currency/currency.entity.js.map +1 -1
- package/lib/system/driving/category.entity.d.ts +7 -7
- package/lib/system/driving/category.entity.js +12 -12
- package/lib/system/driving/category.entity.js.map +1 -1
- package/lib/system/driving/vehicle.entity.d.ts +2 -2
- package/lib/system/driving/vehicle.entity.js +4 -4
- package/lib/system/driving/vehicle.entity.js.map +1 -1
- package/lib/system/event/event.entity.d.ts +2 -2
- package/lib/system/event/event.entity.js +4 -4
- package/lib/system/event/event.entity.js.map +1 -1
- package/lib/system/event/log.entity.d.ts +2 -2
- package/lib/system/event/log.entity.js +3 -3
- package/lib/system/event/log.entity.js.map +1 -1
- package/lib/system/policy/policy.entity.d.ts +1 -1
- package/lib/system/policy/policy.entity.js +5 -5
- package/lib/system/policy/policy.entity.js.map +1 -1
- package/lib/system/staff/staff.entity.d.ts +1 -1
- package/lib/system/staff/staff.entity.js +3 -3
- package/lib/system/staff/staff.entity.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/user/alert.entity.d.ts +3 -2
- package/lib/user/alert.entity.js +11 -4
- package/lib/user/alert.entity.js.map +1 -1
- package/lib/user/blocked.entity.js +2 -2
- package/lib/user/blocked.entity.js.map +1 -1
- package/lib/user/device.entity.d.ts +15 -0
- package/lib/user/device.entity.js +26 -0
- 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 +8 -3
- package/lib/user/ticket.entity.js +11 -4
- package/lib/user/ticket.entity.js.map +1 -1
- package/lib/user/user.entity.d.ts +91 -82
- package/lib/user/user.entity.js +257 -259
- package/lib/user/user.entity.js.map +1 -1
- package/lib/user/verification.entity.js +2 -2
- package/lib/user/verification.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 +2 -2
- package/lib/utils/trackable.js.map +1 -1
- package/package.json +2 -2
- package/lib/profile/company/course/appointment.entity.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Language } from '@driveup/shared';
|
|
2
1
|
import { Activity, Content, Skill, Topic } from '@driveup/common';
|
|
3
|
-
import {
|
|
2
|
+
import { Language } from '@driveup/shared';
|
|
4
3
|
import { TrackableEntity } from '../../../utils/trackable';
|
|
4
|
+
import { SeedCourseLessonEntity } from './lesson.entity';
|
|
5
5
|
/**
|
|
6
6
|
* Represents a topic within a lesson.
|
|
7
7
|
* Topics are the smallest learning units that define specific skills and knowledge areas.
|
|
@@ -10,15 +10,15 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.SeedCourseTopicEntity = void 0;
|
|
13
|
+
const common_1 = require("@driveup/common");
|
|
14
|
+
const shared_1 = require("@driveup/shared");
|
|
15
|
+
const nestjs_i18n_1 = require("nestjs-i18n");
|
|
13
16
|
const typeorm_1 = require("typeorm");
|
|
14
17
|
const typeorm_2 = require("typeorm");
|
|
15
|
-
const nestjs_i18n_1 = require("nestjs-i18n");
|
|
16
|
-
const shared_1 = require("@driveup/shared");
|
|
17
|
-
const common_1 = require("@driveup/common");
|
|
18
|
-
const lesson_entity_1 = require("./lesson.entity");
|
|
19
18
|
const staff_entity_1 = require("../../../system/staff/staff.entity");
|
|
20
|
-
const trackable_1 = require("../../../utils/trackable");
|
|
21
19
|
const activity_helper_1 = require("../../../utils/activity.helper");
|
|
20
|
+
const trackable_1 = require("../../../utils/trackable");
|
|
21
|
+
const lesson_entity_1 = require("./lesson.entity");
|
|
22
22
|
/**
|
|
23
23
|
* Represents a topic within a lesson.
|
|
24
24
|
* Topics are the smallest learning units that define specific skills and knowledge areas.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topic.entity.js","sourceRoot":"","sources":["../../../../src/catalog/seed/courses/topic.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"topic.entity.js","sourceRoot":"","sources":["../../../../src/catalog/seed/courses/topic.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAkE;AAClE,4CAAyD;AACzD,6CAA0C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,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAClC,CAAC;CACD,CAAA;AAlJY,sDAAqB;AAMjC;IADC,IAAA,gBAAM,GAAE;;uDACQ;AAUjB;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;2DACsB;AASxB;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;uDACe;AAWjB;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;qDACc;AAUhB;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;mDACW;AAMb;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,sCAAsB,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;;qDACzB;gCApD5B,qBAAqB;IADjC,IAAA,gBAAM,EAAC,kBAAkB,CAAC;;GACd,qBAAqB,CAkJjC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Language } from '@driveup/shared';
|
|
2
1
|
import { Activity, Category, Content } from '@driveup/common';
|
|
2
|
+
import { Language } from '@driveup/shared';
|
|
3
3
|
import { TrackableEntity } from '../../../utils/trackable';
|
|
4
4
|
/**
|
|
5
5
|
* Represents a seed expense category template in the system.
|
|
@@ -10,13 +10,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.SeedExpenseCategoryEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const nestjs_i18n_1 = require("nestjs-i18n");
|
|
15
|
-
const shared_1 = require("@driveup/shared");
|
|
16
13
|
const common_1 = require("@driveup/common");
|
|
14
|
+
const shared_1 = require("@driveup/shared");
|
|
15
|
+
const nestjs_i18n_1 = require("nestjs-i18n");
|
|
16
|
+
const typeorm_1 = require("typeorm");
|
|
17
17
|
const staff_entity_1 = require("../../../system/staff/staff.entity");
|
|
18
|
-
const trackable_1 = require("../../../utils/trackable");
|
|
19
18
|
const activity_helper_1 = require("../../../utils/activity.helper");
|
|
19
|
+
const trackable_1 = require("../../../utils/trackable");
|
|
20
20
|
/**
|
|
21
21
|
* Represents a seed expense category template in the system.
|
|
22
22
|
* Expense categories are predefined classifications for company expenses
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.entity.js","sourceRoot":"","sources":["../../../../src/catalog/seed/expense/category.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"category.entity.js","sourceRoot":"","sources":["../../../../src/catalog/seed/expense/category.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA8D;AAC9D,4CAAyD;AACzD,6CAA0C;AAC1C,qCAAyC;AAEzC,qEAAiE;AACjE,oEAA4D;AAC5D,wDAA2D;AAE3D;;;;;;;GAOG;AAEI,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,2BAAyB;IAwCvE;;;OAGG;IACH,YAAY,KAA0C;QACrD,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACH,OAAO,CAAC,IAAc;QACrB,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC9C,OAAO,IAAI,iBAAQ,CAAC;YACnB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,WAAW,EAAE,KAAK;YACzB,WAAW,E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,4BAAU,EAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,qBAAY,CAAC,OAAO,EAAE,0BAAW,CAAC,CAAC,CAAC;QACrG,UAAU,CAAC,IAAI,CAAC,MAAM,IAAA,4BAAU,EAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,qBAAY,CAAC,OAAO,EAAE,0BAAW,CAAC,CAAC,CAAC;QACrG,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAClC,CAAC;CACD,CAAA;AArHY,8DAAyB;AAUrC;IALC,IAAA,gBAAM,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,CAqHrC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export * from './profile/agent/agent.entity';
|
|
|
14
14
|
export * from './profile/agent/asset.entity';
|
|
15
15
|
export * from './profile/agent/payout.entity';
|
|
16
16
|
export * from './profile/agent/promotion.entity';
|
|
17
|
-
export * from './profile/company/course/
|
|
17
|
+
export * from './profile/company/course/schedule.entity';
|
|
18
18
|
export * from './profile/company/course/course.entity';
|
|
19
19
|
export * from './profile/company/course/lesson.entity';
|
|
20
20
|
export * from './profile/company/course/topic.entity';
|
package/lib/index.js
CHANGED
|
@@ -33,7 +33,7 @@ __exportStar(require("./profile/agent/asset.entity"), exports);
|
|
|
33
33
|
__exportStar(require("./profile/agent/payout.entity"), exports);
|
|
34
34
|
__exportStar(require("./profile/agent/promotion.entity"), exports);
|
|
35
35
|
// profile: company
|
|
36
|
-
__exportStar(require("./profile/company/course/
|
|
36
|
+
__exportStar(require("./profile/company/course/schedule.entity"), exports);
|
|
37
37
|
__exportStar(require("./profile/company/course/course.entity"), exports);
|
|
38
38
|
__exportStar(require("./profile/company/course/lesson.entity"), exports);
|
|
39
39
|
__exportStar(require("./profile/company/course/topic.entity"), exports);
|
package/lib/index.js.map
CHANGED
|
@@ -1 +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,+DAA6C;AAC7C,gEAA8C;AAC9C,mEAAiD;AACjD,mBAAmB;AACnB,
|
|
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,+DAA6C;AAC7C,gEAA8C;AAC9C,mEAAiD;AACjD,mBAAmB;AACnB,2EAAyD;AACzD,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,+EAA6D;AAC7D,qFAAmE;AACnE,iFAA+D;AAC/D,2EAAyD;AACzD,+EAA6D;AAC7D,2EAAyD;AACzD,yEAAuD;AACvD,6EAA2D;AAC3D,2EAAyD;AACzD,2EAAyD;AACzD,mEAAiD;AACjD,sBAAsB;AACtB,yEAAuD;AACvD,oBAAoB;AACpB,mFAAiE;AACjE,uFAAqE;AACrE,uFAAqE;AACrE,wFAAsE;AACtE,iFAA+D;AAC/D,mFAAiE;AACjE,oFAAkE;AAClE,kFAAgE;AAChE,qFAAmE;AACnE,wFAAsE;AACtE,2EAAyD;AACzD,mEAAiD;AACjD,SAAS;AACT,oEAAkD;AAClD,mEAAiD;AACjD,kEAAgD;AAChD,oEAAkD;AAClD,mEAAiD;AACjD,kEAAgD;AAChD,8DAA4C;AAC5C,4DAA0C;AAC1C,gEAA8C;AAC9C,8DAA4C;AAC5C,sDAAoC;AACpC,wDAAsC;AACtC,uDAAqC;AACrC,6DAA2C;AAC3C,uDAAqC;AACrC,qDAAmC;AACnC,6DAA2C;AAC3C,QAAQ;AACR,0DAAwC;AACxC,4DAA0C;AAC1C,4DAA0C;AAC1C,oDAAkC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Activity, Agent, BankAccount, Person, Preference } from '@driveup/common';
|
|
2
|
+
import { AccountStatus, Language, PreferenceScope } from '@driveup/shared';
|
|
3
3
|
import { UserEntity } from '../../user/user.entity';
|
|
4
|
-
import { AgentPayoutEntity } from './payout.entity';
|
|
5
|
-
import { AgentPromotionEntity } from './promotion.entity';
|
|
6
4
|
import { TrackableEntity } from '../../utils/trackable';
|
|
7
5
|
import { AgentAssetEntity } from './asset.entity';
|
|
6
|
+
import { AgentPayoutEntity } from './payout.entity';
|
|
7
|
+
import { AgentPromotionEntity } from './promotion.entity';
|
|
8
8
|
/**
|
|
9
9
|
* Represents an agent profile in the system.
|
|
10
10
|
* Agents are users who promote Driveup services and earn commissions
|
|
@@ -42,6 +42,12 @@ export declare class AgentEntity extends TrackableEntity<Agent> {
|
|
|
42
42
|
* @default 50
|
|
43
43
|
*/
|
|
44
44
|
percentage: number;
|
|
45
|
+
/**
|
|
46
|
+
* The gift credit amount that will recieve after applying this code
|
|
47
|
+
*
|
|
48
|
+
* By default is set to 50
|
|
49
|
+
*/
|
|
50
|
+
companyGift: number;
|
|
45
51
|
/**
|
|
46
52
|
* Bank account information for payouts
|
|
47
53
|
*/
|
|
@@ -95,6 +101,8 @@ export declare class AgentEntity extends TrackableEntity<Agent> {
|
|
|
95
101
|
* @returns Array of Preference objects or undefined if not set
|
|
96
102
|
*/
|
|
97
103
|
getPreferences(): Preference<boolean>[];
|
|
104
|
+
setPreference(name: string, value: any, scope: PreferenceScope): Promise<Preference<boolean>[]>;
|
|
105
|
+
removePreference(name: string): Promise<Preference<boolean>[]>;
|
|
98
106
|
/**
|
|
99
107
|
* Retrieves activity history for this agent
|
|
100
108
|
* @returns Promise resolving to array of Activity instances tracking creation and updates
|
|
@@ -11,16 +11,16 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var AgentEntity_1;
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.AgentEntity = void 0;
|
|
14
|
-
const typeorm_1 = require("typeorm");
|
|
15
|
-
const shared_1 = require("@driveup/shared");
|
|
16
14
|
const common_1 = require("@driveup/common");
|
|
17
|
-
const
|
|
15
|
+
const shared_1 = require("@driveup/shared");
|
|
16
|
+
const typeorm_1 = require("typeorm");
|
|
18
17
|
const log_entity_1 = require("../../system/event/log.entity");
|
|
19
|
-
const
|
|
20
|
-
const promotion_entity_1 = require("./promotion.entity");
|
|
21
|
-
const trackable_1 = require("../../utils/trackable");
|
|
18
|
+
const user_entity_1 = require("../../user/user.entity");
|
|
22
19
|
const activity_helper_1 = require("../../utils/activity.helper");
|
|
20
|
+
const trackable_1 = require("../../utils/trackable");
|
|
23
21
|
const asset_entity_1 = require("./asset.entity");
|
|
22
|
+
const payout_entity_1 = require("./payout.entity");
|
|
23
|
+
const promotion_entity_1 = require("./promotion.entity");
|
|
24
24
|
/**
|
|
25
25
|
* Represents an agent profile in the system.
|
|
26
26
|
* Agents are users who promote Driveup services and earn commissions
|
|
@@ -100,6 +100,23 @@ let AgentEntity = AgentEntity_1 = class AgentEntity extends trackable_1.Trackabl
|
|
|
100
100
|
return;
|
|
101
101
|
return this.preferences.map(common_1.Preference.toInstance);
|
|
102
102
|
}
|
|
103
|
+
async setPreference(name, value, scope) {
|
|
104
|
+
this.preferences = this.preferences || [];
|
|
105
|
+
this.preferences = this.preferences.filter(p => p.name !== name);
|
|
106
|
+
this.preferences.push(new common_1.Preference({
|
|
107
|
+
scope: scope,
|
|
108
|
+
name: name,
|
|
109
|
+
value: value
|
|
110
|
+
}));
|
|
111
|
+
await AgentEntity_1.save(this);
|
|
112
|
+
return this.preferences;
|
|
113
|
+
}
|
|
114
|
+
async removePreference(name) {
|
|
115
|
+
this.preferences = this.preferences || [];
|
|
116
|
+
this.preferences = this.preferences.filter(p => p.name !== name);
|
|
117
|
+
await AgentEntity_1.save(this);
|
|
118
|
+
return this.preferences;
|
|
119
|
+
}
|
|
103
120
|
/**
|
|
104
121
|
* Retrieves activity history for this agent
|
|
105
122
|
* @returns Promise resolving to array of Activity instances tracking creation and updates
|
|
@@ -182,6 +199,13 @@ __decorate([
|
|
|
182
199
|
(0, typeorm_1.Column)({ default: 50 }),
|
|
183
200
|
__metadata("design:type", Number)
|
|
184
201
|
], AgentEntity.prototype, "percentage", void 0);
|
|
202
|
+
__decorate([
|
|
203
|
+
(0, typeorm_1.Column)({
|
|
204
|
+
nullable: true,
|
|
205
|
+
default: 50
|
|
206
|
+
}),
|
|
207
|
+
__metadata("design:type", Number)
|
|
208
|
+
], AgentEntity.prototype, "companyGift", void 0);
|
|
185
209
|
__decorate([
|
|
186
210
|
(0, typeorm_1.Column)({
|
|
187
211
|
type: 'simple-json',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.entity.js","sourceRoot":"","sources":["../../../src/profile/agent/agent.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAA+D;
|
|
1
|
+
{"version":3,"file":"agent.entity.js","sourceRoot":"","sources":["../../../src/profile/agent/agent.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,4CAAmF;AACnF,4CAA+G;AAC/G,qCAA+D;AAE/D,8DAA0D;AAC1D,wDAAoD;AACpD,iEAAyD;AACzD,qDAAwD;AACxD,iDAAkD;AAClD,mDAAoD;AACpD,yDAA0D;AAE1D;;;;;;;GAOG;AAEI,IAAM,WAAW,mBAAjB,MAAM,WAAY,SAAQ,2BAAsB;IA4GtD;;;OAGG;IACH,YAAY,KAA4B;QACvC,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,IAAY;QAClC,OAAO,aAAW,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IACxC,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,OAAO;QACZ,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC;QAC7B,OAAO,IAAI,cAAK,CAAC;YAChB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI;YAC5B,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ;YACxC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,UAAU,EAAE,IAAI,CAAC,UAAU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;AAOb;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;+CACL;AAWnB;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;KACX,CAAC;;gDACkB;AAUpB;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;8BACW,oBAAW;gDAAC;AAUzB;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;gDACwB;AAO1B;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wBAAU,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC;;yCAC/B;AAMzB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAoB,EAAE,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC;;+CACxB;AAM5C;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,iCAAiB,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC;;4CACrB;AAGtC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,+BAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;;2CACpB;sBA1GxB,WAAW;IADvB,IAAA,gBAAM,EAAC,QAAQ,CAAC;;GACJ,WAAW,CAwPvB"}
|
|
@@ -10,9 +10,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AgentAssetEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const shared_1 = require("@driveup/shared");
|
|
15
13
|
const common_1 = require("@driveup/common");
|
|
14
|
+
const shared_1 = require("@driveup/shared");
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
16
16
|
const trackable_1 = require("../../utils/trackable");
|
|
17
17
|
const agent_entity_1 = require("./agent.entity");
|
|
18
18
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset.entity.js","sourceRoot":"","sources":["../../../src/profile/agent/asset.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"asset.entity.js","sourceRoot":"","sources":["../../../src/profile/agent/asset.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAkD;AAClD,4CAA4C;AAC5C,qCAAoD;AAEpD,qDAAwD;AACxD,iDAA6C;AAE7C;;;;;;;GAOG;AAEI,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,2BAAsB;IA4C3D;;;OAGG;IACH,YAAY,KAAiC;QAC5C,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACH,OAAO;QACN,sCAAsC;QACtC,OAAO,IAAI,cAAK,EAAE,CAAC;IACpB,CAAC;IAED;;;OAGG;IACH,SAAS;QACR,sCAAsC;QACtC,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,aAAa;QAClB,sCAAsC;QACtC,MAAM,UAAU,GAAe,EAAE,CAAC;QAClC,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAA;AAhFY,4CAAgB;AAM5B;IADC,IAAA,gBAAM,GAAE;;iDACO;AAahB;IAPC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,kBAAS;QACf,OAAO,EAAE,kBAAS,CAAC,KAAK;QACxB,QAAQ,EAAE,KAAK;KACf,CAAC;;8CACc;AAUhB;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,KAAK;KACd,CAAC;;+CACY;AAOd;IADC,IAAA,gBAAM,GAAE;;6CACG;AAMZ;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,0BAAW,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;;+CACzB;2BA1Cf,gBAAgB;IAD5B,IAAA,gBAAM,EAAC,aAAa,CAAC;;GACT,gBAAgB,CAgF5B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { StatusType } from '@driveup/shared';
|
|
2
1
|
import { Activity, BankAccount, Payout } from '@driveup/common';
|
|
2
|
+
import { StatusType } from '@driveup/shared';
|
|
3
|
+
import { TrackableEntity } from '../../utils/trackable';
|
|
3
4
|
import { AgentEntity } from './agent.entity';
|
|
4
5
|
import { AgentPromotionEntity } from './promotion.entity';
|
|
5
|
-
import { TrackableEntity } from '../../utils/trackable';
|
|
6
6
|
/**
|
|
7
7
|
* Represents a payout to an agent for their earned commissions.
|
|
8
8
|
* Payouts aggregate multiple promotions and track the payment status,
|
|
@@ -10,14 +10,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AgentPayoutEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const shared_1 = require("@driveup/shared");
|
|
15
13
|
const common_1 = require("@driveup/common");
|
|
14
|
+
const shared_1 = require("@driveup/shared");
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
16
16
|
const staff_entity_1 = require("../../system/staff/staff.entity");
|
|
17
|
+
const activity_helper_1 = require("../../utils/activity.helper");
|
|
18
|
+
const trackable_1 = require("../../utils/trackable");
|
|
17
19
|
const agent_entity_1 = require("./agent.entity");
|
|
18
20
|
const promotion_entity_1 = require("./promotion.entity");
|
|
19
|
-
const trackable_1 = require("../../utils/trackable");
|
|
20
|
-
const activity_helper_1 = require("../../utils/activity.helper");
|
|
21
21
|
/**
|
|
22
22
|
* Represents a payout to an agent for their earned commissions.
|
|
23
23
|
* Payouts aggregate multiple promotions and track the payment status,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payout.entity.js","sourceRoot":"","sources":["../../../src/profile/agent/payout.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA+D;
|
|
1
|
+
{"version":3,"file":"payout.entity.js","sourceRoot":"","sources":["../../../src/profile/agent/payout.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAgE;AAChE,4CAA2D;AAC3D,qCAA+D;AAE/D,kEAA8D;AAC9D,iEAAyD;AACzD,qDAAwD;AACxD,iDAA6C;AAC7C,yDAA0D;AAE1D;;;;;;GAMG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,2BAAuB;IAwE7D;;;OAGG;IACH,YAAY,KAAkC;QAC7C,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,OAAO;QACZ,OAAO,IAAI,eAAM,CAAC;YACjB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,WAAW,EAAE,oBAAW,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC;SACrD,CAAC,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,SAAS;QACd,OAAO,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa;QAClB,MAAM,UAAU,GAAe,EAAE,CAAC;QAClC,UAAU,CAAC,IAAI,CAAC,MAAM,IAAA,4BAAU,EAAC,IAAI,CAAC,SAAS,EAAE,I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AO,CAAC;;gDACzB;AAM5B;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAoB,EAAE,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC;;qDACzB;4BAtEhC,iBAAiB;IAD7B,IAAA,gBAAM,EAAC,cAAc,CAAC;;GACV,iBAAiB,CAiH7B"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Activity, PayoutItem } from '@driveup/common';
|
|
2
|
-
import {
|
|
3
|
-
import { AgentPayoutEntity } from './payout.entity';
|
|
2
|
+
import { TrackableEntity } from '../../utils/trackable';
|
|
4
3
|
import { CompanyEntity } from '../company/company.entity';
|
|
5
4
|
import { CompanyBillTransactionEntity } from '../company/finances/billing/transaction.entity';
|
|
6
|
-
import {
|
|
5
|
+
import { AgentEntity } from './agent.entity';
|
|
6
|
+
import { AgentPayoutEntity } from './payout.entity';
|
|
7
7
|
/**
|
|
8
8
|
* Represents a promotion generated by an agent.
|
|
9
9
|
* Tracks the relationship between an agent, a referred company, and the
|
|
@@ -10,15 +10,15 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AgentPromotionEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const shared_1 = require("@driveup/shared");
|
|
15
13
|
const common_1 = require("@driveup/common");
|
|
16
|
-
const
|
|
17
|
-
const
|
|
14
|
+
const shared_1 = require("@driveup/shared");
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
16
|
+
const activity_helper_1 = require("../../utils/activity.helper");
|
|
17
|
+
const trackable_1 = require("../../utils/trackable");
|
|
18
18
|
const company_entity_1 = require("../company/company.entity");
|
|
19
19
|
const transaction_entity_1 = require("../company/finances/billing/transaction.entity");
|
|
20
|
-
const
|
|
21
|
-
const
|
|
20
|
+
const agent_entity_1 = require("./agent.entity");
|
|
21
|
+
const payout_entity_1 = require("./payout.entity");
|
|
22
22
|
/**
|
|
23
23
|
* Represents a promotion generated by an agent.
|
|
24
24
|
* Tracks the relationship between an agent, a referred company, and the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promotion.entity.js","sourceRoot":"","sources":["../../../src/profile/agent/promotion.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"promotion.entity.js","sourceRoot":"","sources":["../../../src/profile/agent/promotion.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA+D;AAC/D,4CAA+C;AAC/C,qCAA0E;AAE1E,iEAAyD;AACzD,qDAAwD;AACxD,8DAA0D;AAC1D,uFAA8F;AAC9F,iDAA6C;AAC7C,mDAAoD;AAEpD;;;;;;GAMG;AAEI,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,2BAA2B;IA6EpE;;;OAGG;IACH,YAAY,KAAqC;QAChD,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,OAAO;QACZ,OAAO,IAAI,mBAAU,CAAC;YACrB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,eAAM,CAAC;gBAClB,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,OAAO,EAAE,IAAI,CAAC,OAAO;aACrB,CAAC;YACF,QAAQ,EAAE,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE;SAC5C,CAAC,CAAA;IACH,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,SAAS;QACd,OAAO,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa;QAClB,MAAM,UAAU,GAAe,EAAE,CAAC;QAClC,UAAU,CAAC,I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,CAAC,MAAM,CAAC,UAAU,CAAC;;oDAC7B;AAOnC;IAFC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,iDAA4B,EAAE,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,cAAc,CAAC;IACvF,IAAA,oBAAU,GAAE;;yDACsC;+BA3EvC,oBAAoB;IADhC,IAAA,gBAAM,EAAC,iBAAiB,CAAC;;GACb,oBAAoB,CAyHhC"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Activity, Address, Company, Holiday, Period, WorkingHours } from '@driveup/common';
|
|
2
|
+
import { BankAccount, Customer, Link, Preference, Tax } from '@driveup/common';
|
|
3
|
+
import { AccountStatus, AddonType, Language, PreferenceScope } from '@driveup/shared';
|
|
4
4
|
import { CountryEntity } from '../../system/country/country.entity';
|
|
5
|
-
import {
|
|
5
|
+
import { TrackableEntity } from '../../utils/trackable';
|
|
6
|
+
import { AgentPromotionEntity } from '../agent/promotion.entity';
|
|
7
|
+
import { CompanyBillEntity } from './finances/billing/bill.entity';
|
|
6
8
|
import { CompanyExpenseCategoryEntity } from './finances/expense/category.entity';
|
|
9
|
+
import { CompanyExpenseEntity } from './finances/expense/expense.entity';
|
|
7
10
|
import { CompanyHandoverEntity } from './finances/handover/handover.entity';
|
|
8
11
|
import { CompanyInvoiceEntity } from './finances/invoice/invoice.entity';
|
|
9
12
|
import { CompanyPaymentMethodEntity } from './finances/payment/method.entity';
|
|
10
|
-
import { CompanyBillEntity } from './finances/billing/bill.entity';
|
|
11
|
-
import { CompanyProductEntity } from './product/product.entity';
|
|
12
13
|
import { CompanyInstructorEntity } from './instructor/instructor.entity';
|
|
13
|
-
import { AgentPromotionEntity } from '../agent/promotion.entity';
|
|
14
|
-
import { TrackableEntity } from '../../utils/trackable';
|
|
15
14
|
import { CompanyAddonEntity } from './product/addon.entity';
|
|
15
|
+
import { CompanyProductEntity } from './product/product.entity';
|
|
16
16
|
/**
|
|
17
17
|
* Represents a driving school company in the system.
|
|
18
18
|
* Companies offer training products, manage instructors and students,
|
|
@@ -110,6 +110,12 @@ export declare class CompanyEntity extends TrackableEntity<Company> {
|
|
|
110
110
|
* Tax configuration for invoicing
|
|
111
111
|
*/
|
|
112
112
|
tax: Tax;
|
|
113
|
+
/**
|
|
114
|
+
* The obligation period set by the company. If the students cancel their driving appointments outside of this period, they will not be charged for the session
|
|
115
|
+
*
|
|
116
|
+
* Calculated in number of hours
|
|
117
|
+
*/
|
|
118
|
+
obligationPeriod: number;
|
|
113
119
|
/**
|
|
114
120
|
* Weekly working hours schedule
|
|
115
121
|
*/
|
|
@@ -228,6 +234,28 @@ export declare class CompanyEntity extends TrackableEntity<Company> {
|
|
|
228
234
|
* @returns Formatted address string with location, address, and zip code
|
|
229
235
|
*/
|
|
230
236
|
getFullAddress(): string;
|
|
237
|
+
/**
|
|
238
|
+
* Retrieves the active payment method for the company
|
|
239
|
+
* @returns CompanyPaymentMethodEntity - the active company payment method
|
|
240
|
+
*/
|
|
241
|
+
getActivePaymentMethod(): Promise<CompanyPaymentMethodEntity>;
|
|
242
|
+
/**
|
|
243
|
+
* Retrieves the active payment method for the company
|
|
244
|
+
* @returns CompanyPaymentMethodEntity - the active company payment method
|
|
245
|
+
*/
|
|
246
|
+
getPendingPaymentMethod(): Promise<CompanyPaymentMethodEntity>;
|
|
247
|
+
/**
|
|
248
|
+
* Finds if there are any failed payments (unpaid bills) for the company
|
|
249
|
+
*/
|
|
250
|
+
hasFailedTransactions(): Promise<boolean>;
|
|
251
|
+
getHolidays(period: Period): Holiday[];
|
|
252
|
+
/**
|
|
253
|
+
* Check if a given period collides with any of the company's holidays
|
|
254
|
+
* @param Period
|
|
255
|
+
* @returns boolean - true if the period collides with any of the company's holidays
|
|
256
|
+
*/
|
|
257
|
+
collidesWithHolidays(period: Period): boolean;
|
|
258
|
+
getNonWorkingHours(period: Period): Period[];
|
|
231
259
|
/**
|
|
232
260
|
* Retrieves activity history for this company
|
|
233
261
|
* @returns Promise resolving to array of Activity instances tracking creation, updates, and closure
|
|
@@ -240,4 +268,7 @@ export declare class CompanyEntity extends TrackableEntity<Company> {
|
|
|
240
268
|
*/
|
|
241
269
|
log(event: string, metadata?: any): Promise<void>;
|
|
242
270
|
getAddonByType(type: AddonType): Promise<CompanyAddonEntity>;
|
|
271
|
+
getPreferences(): Preference<boolean>[];
|
|
272
|
+
setPreference(name: string, value: any, scope: PreferenceScope): Promise<Preference<boolean>[]>;
|
|
273
|
+
removePreference(name: string): Promise<Preference<boolean>[]>;
|
|
243
274
|
}
|