@tomei/rental 0.2.5 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/.commitlintrc.json +22 -22
  2. package/.eslintrc +16 -16
  3. package/.eslintrc.js +35 -35
  4. package/.husky/commit-msg +15 -15
  5. package/.husky/pre-commit +7 -7
  6. package/.prettierrc +4 -4
  7. package/Jenkinsfile +51 -57
  8. package/README.md +8 -8
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.js +17 -17
  11. package/dist/src/components/rental/rental.d.ts +36 -35
  12. package/dist/src/components/rental/rental.js +238 -208
  13. package/dist/src/components/rental/rental.js.map +1 -1
  14. package/dist/src/components/rental/rental.repository.d.ts +8 -8
  15. package/dist/src/components/rental/rental.repository.js +66 -66
  16. package/dist/src/components/rental-price/rental-price.d.ts +12 -12
  17. package/dist/src/components/rental-price/rental-price.js +71 -71
  18. package/dist/src/components/rental-price/rental-price.repository.d.ts +8 -8
  19. package/dist/src/components/rental-price/rental-price.repository.js +66 -66
  20. package/dist/src/database.d.ts +4 -4
  21. package/dist/src/database.js +19 -19
  22. package/dist/src/enum/index.d.ts +2 -2
  23. package/dist/src/enum/index.js +5 -5
  24. package/dist/src/enum/rental-status.enum.d.ts +6 -6
  25. package/dist/src/enum/rental-status.enum.js +10 -10
  26. package/dist/src/index.d.ts +9 -9
  27. package/dist/src/index.js +30 -30
  28. package/dist/src/interfaces/index.d.ts +4 -4
  29. package/dist/src/interfaces/index.js +2 -2
  30. package/dist/src/interfaces/rental-attr.interface.d.ts +20 -20
  31. package/dist/src/interfaces/rental-attr.interface.js +2 -2
  32. package/dist/src/interfaces/rental-find-all-search-attr.interface.d.ts +8 -8
  33. package/dist/src/interfaces/rental-find-all-search-attr.interface.js +2 -2
  34. package/dist/src/interfaces/rental-price-attr.interface.d.ts +7 -7
  35. package/dist/src/interfaces/rental-price-attr.interface.js +2 -2
  36. package/dist/src/models/index.d.ts +3 -3
  37. package/dist/src/models/index.js +7 -7
  38. package/dist/src/models/rental-price.entity.d.ts +8 -8
  39. package/dist/src/models/rental-price.entity.js +58 -58
  40. package/dist/src/models/rental.entity.d.ts +23 -23
  41. package/dist/src/models/rental.entity.js +140 -138
  42. package/dist/src/models/rental.entity.js.map +1 -1
  43. package/dist/tsconfig.tsbuildinfo +1 -1
  44. package/jest.config.js +10 -10
  45. package/migrations/rental-price-table-migration.js +32 -32
  46. package/migrations/rental-table-migrations.js +86 -84
  47. package/package.json +71 -71
  48. package/src/components/rental/rental.repository.ts +51 -51
  49. package/src/components/rental/rental.ts +332 -285
  50. package/src/components/rental-price/rental-price.repository.ts +54 -54
  51. package/src/components/rental-price/rental-price.ts +89 -89
  52. package/src/database.ts +21 -21
  53. package/src/enum/index.ts +3 -3
  54. package/src/enum/rental-status.enum.ts +6 -6
  55. package/src/index.ts +16 -16
  56. package/src/interfaces/index.ts +5 -5
  57. package/src/interfaces/rental-attr.interface.ts +21 -21
  58. package/src/interfaces/rental-find-all-search-attr.interface.ts +9 -9
  59. package/src/interfaces/rental-price-attr.interface.ts +7 -7
  60. package/src/models/index.ts +4 -4
  61. package/src/models/rental-price.entity.ts +38 -38
  62. package/src/models/rental.entity.ts +116 -114
  63. package/tsconfig.build.json +5 -5
  64. package/tsconfig.json +23 -23
  65. package/dist/jest.config.d.ts +0 -2
  66. package/dist/jest.config.js +0 -11
  67. package/dist/jest.config.js.map +0 -1
  68. package/dist/migrations/rental-price-table-migration.d.ts +0 -2
  69. package/dist/migrations/rental-price-table-migration.js +0 -43
  70. package/dist/migrations/rental-price-table-migration.js.map +0 -1
  71. package/dist/migrations/rental-table-migrations.d.ts +0 -2
  72. package/dist/migrations/rental-table-migrations.js +0 -95
  73. package/dist/migrations/rental-table-migrations.js.map +0 -1
@@ -1,12 +1,12 @@
1
- import { LoginUser } from '@tomei/sso';
2
- export declare class RentalPrice {
3
- PriceId: string;
4
- RetailPrice: number;
5
- Currency: string;
6
- PromoCode: string;
7
- Remarks: string;
8
- private static _Repo;
9
- private constructor();
10
- static init(dbTransaction?: any, priceId?: string): Promise<RentalPrice>;
11
- create(loginUser: LoginUser, dbTransaction?: any): Promise<this>;
12
- }
1
+ import { LoginUser } from '@tomei/sso';
2
+ export declare class RentalPrice {
3
+ PriceId: string;
4
+ RetailPrice: number;
5
+ Currency: string;
6
+ PromoCode: string;
7
+ Remarks: string;
8
+ private static _Repo;
9
+ private constructor();
10
+ static init(dbTransaction?: any, priceId?: string): Promise<RentalPrice>;
11
+ create(loginUser: LoginUser, dbTransaction?: any): Promise<this>;
12
+ }
@@ -1,72 +1,72 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.RentalPrice = void 0;
13
- const general_1 = require("@tomei/general");
14
- const rental_price_repository_1 = require("./rental-price.repository");
15
- const config_1 = require("@tomei/config");
16
- const cuid = require("cuid");
17
- class RentalPrice {
18
- constructor(rentalPriceAttr) {
19
- if (rentalPriceAttr) {
20
- this.PriceId = rentalPriceAttr.PriceId;
21
- this.RetailPrice = rentalPriceAttr.RetailPrice;
22
- this.Currency = rentalPriceAttr.Currency;
23
- this.PromoCode = rentalPriceAttr.PromoCode;
24
- this.Remarks = rentalPriceAttr.Remarks;
25
- }
26
- }
27
- static init(dbTransaction, priceId) {
28
- return __awaiter(this, void 0, void 0, function* () {
29
- try {
30
- if (priceId) {
31
- const rentalPrice = yield RentalPrice._Repo.findByPk(priceId, dbTransaction);
32
- if (rentalPrice) {
33
- return new RentalPrice(rentalPrice);
34
- }
35
- else {
36
- throw new general_1.ClassError('RentalPrice', 'RentalPriceErrMsg', 'RentalPrice Not Found');
37
- }
38
- }
39
- return new RentalPrice();
40
- }
41
- catch (error) {
42
- throw new general_1.ClassError('RentalPrice', 'RentalPriceErrMsg', 'Failed To Initialize RentalPrice');
43
- }
44
- });
45
- }
46
- create(loginUser, dbTransaction) {
47
- return __awaiter(this, void 0, void 0, function* () {
48
- try {
49
- const systemCode = config_1.ApplicationConfig.getComponentConfigValue('system-code');
50
- const isPrivileged = yield loginUser.checkPrivileges(systemCode, 'Rental - Create');
51
- if (!isPrivileged) {
52
- throw new general_1.ClassError('RentalPrice', 'RentalPriceErrMsg', 'You do not have the privilege.');
53
- }
54
- this.PriceId = cuid();
55
- yield RentalPrice._Repo.create({
56
- PriceId: this.PriceId,
57
- RetailPrice: this.RetailPrice,
58
- Currency: this.Currency,
59
- PromoCode: this.PromoCode,
60
- Remarks: this.Remarks,
61
- }, dbTransaction);
62
- return this;
63
- }
64
- catch (error) {
65
- throw error;
66
- }
67
- });
68
- }
69
- }
70
- exports.RentalPrice = RentalPrice;
71
- RentalPrice._Repo = new rental_price_repository_1.RentalPriceRepository();
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.RentalPrice = void 0;
13
+ const general_1 = require("@tomei/general");
14
+ const rental_price_repository_1 = require("./rental-price.repository");
15
+ const config_1 = require("@tomei/config");
16
+ const cuid = require("cuid");
17
+ class RentalPrice {
18
+ constructor(rentalPriceAttr) {
19
+ if (rentalPriceAttr) {
20
+ this.PriceId = rentalPriceAttr.PriceId;
21
+ this.RetailPrice = rentalPriceAttr.RetailPrice;
22
+ this.Currency = rentalPriceAttr.Currency;
23
+ this.PromoCode = rentalPriceAttr.PromoCode;
24
+ this.Remarks = rentalPriceAttr.Remarks;
25
+ }
26
+ }
27
+ static init(dbTransaction, priceId) {
28
+ return __awaiter(this, void 0, void 0, function* () {
29
+ try {
30
+ if (priceId) {
31
+ const rentalPrice = yield RentalPrice._Repo.findByPk(priceId, dbTransaction);
32
+ if (rentalPrice) {
33
+ return new RentalPrice(rentalPrice);
34
+ }
35
+ else {
36
+ throw new general_1.ClassError('RentalPrice', 'RentalPriceErrMsg', 'RentalPrice Not Found');
37
+ }
38
+ }
39
+ return new RentalPrice();
40
+ }
41
+ catch (error) {
42
+ throw new general_1.ClassError('RentalPrice', 'RentalPriceErrMsg', 'Failed To Initialize RentalPrice');
43
+ }
44
+ });
45
+ }
46
+ create(loginUser, dbTransaction) {
47
+ return __awaiter(this, void 0, void 0, function* () {
48
+ try {
49
+ const systemCode = config_1.ApplicationConfig.getComponentConfigValue('system-code');
50
+ const isPrivileged = yield loginUser.checkPrivileges(systemCode, 'Rental - Create');
51
+ if (!isPrivileged) {
52
+ throw new general_1.ClassError('RentalPrice', 'RentalPriceErrMsg', 'You do not have the privilege.');
53
+ }
54
+ this.PriceId = cuid();
55
+ yield RentalPrice._Repo.create({
56
+ PriceId: this.PriceId,
57
+ RetailPrice: this.RetailPrice,
58
+ Currency: this.Currency,
59
+ PromoCode: this.PromoCode,
60
+ Remarks: this.Remarks,
61
+ }, dbTransaction);
62
+ return this;
63
+ }
64
+ catch (error) {
65
+ throw error;
66
+ }
67
+ });
68
+ }
69
+ }
70
+ exports.RentalPrice = RentalPrice;
71
+ RentalPrice._Repo = new rental_price_repository_1.RentalPriceRepository();
72
72
  //# sourceMappingURL=rental-price.js.map
@@ -1,8 +1,8 @@
1
- import { RepositoryBase, IRepositoryBase } from '@tomei/general';
2
- import { RentalPriceModel } from '../../models/rental-price.entity';
3
- export declare class RentalPriceRepository extends RepositoryBase<RentalPriceModel> implements IRepositoryBase<RentalPriceModel> {
4
- constructor();
5
- findByPk(id: string, transaction?: any): Promise<RentalPriceModel | null>;
6
- delete(RentalPriceId: string, dbTransaction?: any): Promise<void>;
7
- findAndCountAll(options?: any): Promise<any>;
8
- }
1
+ import { RepositoryBase, IRepositoryBase } from '@tomei/general';
2
+ import { RentalPriceModel } from '../../models/rental-price.entity';
3
+ export declare class RentalPriceRepository extends RepositoryBase<RentalPriceModel> implements IRepositoryBase<RentalPriceModel> {
4
+ constructor();
5
+ findByPk(id: string, transaction?: any): Promise<RentalPriceModel | null>;
6
+ delete(RentalPriceId: string, dbTransaction?: any): Promise<void>;
7
+ findAndCountAll(options?: any): Promise<any>;
8
+ }
@@ -1,67 +1,67 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.RentalPriceRepository = void 0;
13
- const general_1 = require("@tomei/general");
14
- const rental_price_entity_1 = require("../../models/rental-price.entity");
15
- class RentalPriceRepository extends general_1.RepositoryBase {
16
- constructor() {
17
- super(rental_price_entity_1.RentalPriceModel);
18
- }
19
- findByPk(id, transaction) {
20
- return __awaiter(this, void 0, void 0, function* () {
21
- try {
22
- const result = yield rental_price_entity_1.RentalPriceModel.findByPk(id, {
23
- transaction: transaction,
24
- });
25
- return result;
26
- }
27
- catch (error) {
28
- throw new Error(`An Error occured when fetching : ${error.message}`);
29
- }
30
- });
31
- }
32
- delete(RentalPriceId, dbTransaction) {
33
- return __awaiter(this, void 0, void 0, function* () {
34
- try {
35
- const options = {
36
- where: {
37
- RentalPriceId: RentalPriceId,
38
- },
39
- transaction: dbTransaction,
40
- };
41
- yield rental_price_entity_1.RentalPriceModel.destroy(options);
42
- }
43
- catch (error) {
44
- throw new Error(`An Error occured when delete : ${error.message}`);
45
- }
46
- });
47
- }
48
- findAndCountAll(options) {
49
- return __awaiter(this, void 0, void 0, function* () {
50
- try {
51
- let RentalPrices;
52
- if (options) {
53
- RentalPrices = yield rental_price_entity_1.RentalPriceModel.findAndCountAll(options);
54
- }
55
- else {
56
- RentalPrices = yield rental_price_entity_1.RentalPriceModel.findAndCountAll();
57
- }
58
- return RentalPrices;
59
- }
60
- catch (error) {
61
- throw new Error(`An Error occured when retriving : ${error.message}`);
62
- }
63
- });
64
- }
65
- }
66
- exports.RentalPriceRepository = RentalPriceRepository;
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.RentalPriceRepository = void 0;
13
+ const general_1 = require("@tomei/general");
14
+ const rental_price_entity_1 = require("../../models/rental-price.entity");
15
+ class RentalPriceRepository extends general_1.RepositoryBase {
16
+ constructor() {
17
+ super(rental_price_entity_1.RentalPriceModel);
18
+ }
19
+ findByPk(id, transaction) {
20
+ return __awaiter(this, void 0, void 0, function* () {
21
+ try {
22
+ const result = yield rental_price_entity_1.RentalPriceModel.findByPk(id, {
23
+ transaction: transaction,
24
+ });
25
+ return result;
26
+ }
27
+ catch (error) {
28
+ throw new Error(`An Error occured when fetching : ${error.message}`);
29
+ }
30
+ });
31
+ }
32
+ delete(RentalPriceId, dbTransaction) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ try {
35
+ const options = {
36
+ where: {
37
+ RentalPriceId: RentalPriceId,
38
+ },
39
+ transaction: dbTransaction,
40
+ };
41
+ yield rental_price_entity_1.RentalPriceModel.destroy(options);
42
+ }
43
+ catch (error) {
44
+ throw new Error(`An Error occured when delete : ${error.message}`);
45
+ }
46
+ });
47
+ }
48
+ findAndCountAll(options) {
49
+ return __awaiter(this, void 0, void 0, function* () {
50
+ try {
51
+ let RentalPrices;
52
+ if (options) {
53
+ RentalPrices = yield rental_price_entity_1.RentalPriceModel.findAndCountAll(options);
54
+ }
55
+ else {
56
+ RentalPrices = yield rental_price_entity_1.RentalPriceModel.findAndCountAll();
57
+ }
58
+ return RentalPrices;
59
+ }
60
+ catch (error) {
61
+ throw new Error(`An Error occured when retriving : ${error.message}`);
62
+ }
63
+ });
64
+ }
65
+ }
66
+ exports.RentalPriceRepository = RentalPriceRepository;
67
67
  //# sourceMappingURL=rental-price.repository.js.map
@@ -1,4 +1,4 @@
1
- import { Sequelize, SequelizeOptions } from 'sequelize-typescript';
2
- declare function init(sequelizeOptions: SequelizeOptions): void;
3
- declare function getConnection(): Sequelize;
4
- export { init, getConnection };
1
+ import { Sequelize, SequelizeOptions } from 'sequelize-typescript';
2
+ declare function init(sequelizeOptions: SequelizeOptions): void;
3
+ declare function getConnection(): Sequelize;
4
+ export { init, getConnection };
@@ -1,20 +1,20 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getConnection = exports.init = void 0;
4
- const sequelize_typescript_1 = require("sequelize-typescript");
5
- const rental_entity_1 = require("./models/rental.entity");
6
- const rental_price_entity_1 = require("./models/rental-price.entity");
7
- let sequelize;
8
- function init(sequelizeOptions) {
9
- sequelize = new sequelize_typescript_1.Sequelize(sequelizeOptions);
10
- sequelize.addModels([
11
- rental_entity_1.RentalModel,
12
- rental_price_entity_1.RentalPriceModel,
13
- ]);
14
- }
15
- exports.init = init;
16
- function getConnection() {
17
- return sequelize;
18
- }
19
- exports.getConnection = getConnection;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getConnection = exports.init = void 0;
4
+ const sequelize_typescript_1 = require("sequelize-typescript");
5
+ const rental_entity_1 = require("./models/rental.entity");
6
+ const rental_price_entity_1 = require("./models/rental-price.entity");
7
+ let sequelize;
8
+ function init(sequelizeOptions) {
9
+ sequelize = new sequelize_typescript_1.Sequelize(sequelizeOptions);
10
+ sequelize.addModels([
11
+ rental_entity_1.RentalModel,
12
+ rental_price_entity_1.RentalPriceModel,
13
+ ]);
14
+ }
15
+ exports.init = init;
16
+ function getConnection() {
17
+ return sequelize;
18
+ }
19
+ exports.getConnection = getConnection;
20
20
  //# sourceMappingURL=database.js.map
@@ -1,2 +1,2 @@
1
- import { RentalStatusEnum } from './rental-status.enum';
2
- export { RentalStatusEnum };
1
+ import { RentalStatusEnum } from './rental-status.enum';
2
+ export { RentalStatusEnum };
@@ -1,6 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RentalStatusEnum = void 0;
4
- const rental_status_enum_1 = require("./rental-status.enum");
5
- Object.defineProperty(exports, "RentalStatusEnum", { enumerable: true, get: function () { return rental_status_enum_1.RentalStatusEnum; } });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RentalStatusEnum = void 0;
4
+ const rental_status_enum_1 = require("./rental-status.enum");
5
+ Object.defineProperty(exports, "RentalStatusEnum", { enumerable: true, get: function () { return rental_status_enum_1.RentalStatusEnum; } });
6
6
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
- export declare enum RentalStatusEnum {
2
- ACTIVE = "Active",
3
- SUSPENDED = "Suspended",
4
- CANCELLED = "Cancelled",
5
- TERMINATED = "Terminated"
6
- }
1
+ export declare enum RentalStatusEnum {
2
+ ACTIVE = "Active",
3
+ SUSPENDED = "Suspended",
4
+ CANCELLED = "Cancelled",
5
+ TERMINATED = "Terminated"
6
+ }
@@ -1,11 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RentalStatusEnum = void 0;
4
- var RentalStatusEnum;
5
- (function (RentalStatusEnum) {
6
- RentalStatusEnum["ACTIVE"] = "Active";
7
- RentalStatusEnum["SUSPENDED"] = "Suspended";
8
- RentalStatusEnum["CANCELLED"] = "Cancelled";
9
- RentalStatusEnum["TERMINATED"] = "Terminated";
10
- })(RentalStatusEnum = exports.RentalStatusEnum || (exports.RentalStatusEnum = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RentalStatusEnum = void 0;
4
+ var RentalStatusEnum;
5
+ (function (RentalStatusEnum) {
6
+ RentalStatusEnum["ACTIVE"] = "Active";
7
+ RentalStatusEnum["SUSPENDED"] = "Suspended";
8
+ RentalStatusEnum["CANCELLED"] = "Cancelled";
9
+ RentalStatusEnum["TERMINATED"] = "Terminated";
10
+ })(RentalStatusEnum = exports.RentalStatusEnum || (exports.RentalStatusEnum = {}));
11
11
  //# sourceMappingURL=rental-status.enum.js.map
@@ -1,9 +1,9 @@
1
- import { RentalPriceRepository } from './components/rental-price/rental-price.repository';
2
- import { RentalRepository } from './components/rental/rental.repository';
3
- import { Rental } from './components/rental/rental';
4
- import { RentalPrice } from './components/rental-price/rental-price';
5
- import * as rentalDb from './database';
6
- export * from './interfaces';
7
- export * from './models';
8
- export * from './enum';
9
- export { Rental, RentalPrice, RentalRepository, RentalPriceRepository, rentalDb, };
1
+ import { RentalPriceRepository } from './components/rental-price/rental-price.repository';
2
+ import { RentalRepository } from './components/rental/rental.repository';
3
+ import { Rental } from './components/rental/rental';
4
+ import { RentalPrice } from './components/rental-price/rental-price';
5
+ import * as rentalDb from './database';
6
+ export * from './interfaces';
7
+ export * from './models';
8
+ export * from './enum';
9
+ export { Rental, RentalPrice, RentalRepository, RentalPriceRepository, rentalDb, };
package/dist/src/index.js CHANGED
@@ -1,31 +1,31 @@
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
- exports.rentalDb = exports.RentalPriceRepository = exports.RentalRepository = exports.RentalPrice = exports.Rental = void 0;
18
- const rental_price_repository_1 = require("./components/rental-price/rental-price.repository");
19
- Object.defineProperty(exports, "RentalPriceRepository", { enumerable: true, get: function () { return rental_price_repository_1.RentalPriceRepository; } });
20
- const rental_repository_1 = require("./components/rental/rental.repository");
21
- Object.defineProperty(exports, "RentalRepository", { enumerable: true, get: function () { return rental_repository_1.RentalRepository; } });
22
- const rental_1 = require("./components/rental/rental");
23
- Object.defineProperty(exports, "Rental", { enumerable: true, get: function () { return rental_1.Rental; } });
24
- const rental_price_1 = require("./components/rental-price/rental-price");
25
- Object.defineProperty(exports, "RentalPrice", { enumerable: true, get: function () { return rental_price_1.RentalPrice; } });
26
- const rentalDb = require("./database");
27
- exports.rentalDb = rentalDb;
28
- __exportStar(require("./interfaces"), exports);
29
- __exportStar(require("./models"), exports);
30
- __exportStar(require("./enum"), exports);
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
+ exports.rentalDb = exports.RentalPriceRepository = exports.RentalRepository = exports.RentalPrice = exports.Rental = void 0;
18
+ const rental_price_repository_1 = require("./components/rental-price/rental-price.repository");
19
+ Object.defineProperty(exports, "RentalPriceRepository", { enumerable: true, get: function () { return rental_price_repository_1.RentalPriceRepository; } });
20
+ const rental_repository_1 = require("./components/rental/rental.repository");
21
+ Object.defineProperty(exports, "RentalRepository", { enumerable: true, get: function () { return rental_repository_1.RentalRepository; } });
22
+ const rental_1 = require("./components/rental/rental");
23
+ Object.defineProperty(exports, "Rental", { enumerable: true, get: function () { return rental_1.Rental; } });
24
+ const rental_price_1 = require("./components/rental-price/rental-price");
25
+ Object.defineProperty(exports, "RentalPrice", { enumerable: true, get: function () { return rental_price_1.RentalPrice; } });
26
+ const rentalDb = require("./database");
27
+ exports.rentalDb = rentalDb;
28
+ __exportStar(require("./interfaces"), exports);
29
+ __exportStar(require("./models"), exports);
30
+ __exportStar(require("./enum"), exports);
31
31
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { IRentalAttr } from './rental-attr.interface';
2
- import { IRentalPriceAttr } from './rental-price-attr.interface';
3
- import { IRentalFindAllSearchAttr } from './rental-find-all-search-attr.interface';
4
- export { IRentalAttr, IRentalPriceAttr, IRentalFindAllSearchAttr };
1
+ import { IRentalAttr } from './rental-attr.interface';
2
+ import { IRentalPriceAttr } from './rental-price-attr.interface';
3
+ import { IRentalFindAllSearchAttr } from './rental-find-all-search-attr.interface';
4
+ export { IRentalAttr, IRentalPriceAttr, IRentalFindAllSearchAttr };
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=index.js.map
@@ -1,20 +1,20 @@
1
- import { RentalStatusEnum } from '../enum/rental-status.enum';
2
- export interface IRentalAttr {
3
- RentalId: string;
4
- CustomerId: string;
5
- CustomerType: string;
6
- ItemId: string;
7
- ItemType: string;
8
- PriceId: string;
9
- StartDateTime: Date;
10
- EndDateTime: Date;
11
- CancelRemarks: string;
12
- TerminateRemarks: string;
13
- AgreementNo: string;
14
- Status: RentalStatusEnum;
15
- EscheatmentYN: string;
16
- CreatedById: string;
17
- CreatedAt: Date;
18
- UpdatedById: string;
19
- UpdatedAt: Date;
20
- }
1
+ import { RentalStatusEnum } from '../enum/rental-status.enum';
2
+ export interface IRentalAttr {
3
+ RentalId: string;
4
+ CustomerId: string;
5
+ CustomerType: string;
6
+ ItemId: string;
7
+ ItemType: string;
8
+ PriceId: string;
9
+ StartDateTime: Date;
10
+ EndDateTime: Date;
11
+ CancelRemarks: string;
12
+ TerminateRemarks: string;
13
+ AgreementNo: string;
14
+ Status: RentalStatusEnum;
15
+ EscheatmentYN: string;
16
+ CreatedById: string;
17
+ CreatedAt: Date;
18
+ UpdatedById: string;
19
+ UpdatedAt: Date;
20
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=rental-attr.interface.js.map
@@ -1,8 +1,8 @@
1
- import { RentalStatusEnum } from '../enum/rental-status.enum';
2
- export interface IRentalFindAllSearchAttr {
3
- Status?: RentalStatusEnum;
4
- StartDateTime?: Date;
5
- EndDateTime?: Date;
6
- ItemId?: string;
7
- ItemType?: string;
8
- }
1
+ import { RentalStatusEnum } from '../enum/rental-status.enum';
2
+ export interface IRentalFindAllSearchAttr {
3
+ Status?: RentalStatusEnum;
4
+ StartDateTime?: Date;
5
+ EndDateTime?: Date;
6
+ ItemId?: string;
7
+ ItemType?: string;
8
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=rental-find-all-search-attr.interface.js.map
@@ -1,7 +1,7 @@
1
- export interface IRentalPriceAttr {
2
- PriceId: string;
3
- RetailPrice: number;
4
- Currency: string;
5
- PromoCode: string;
6
- Remarks: string;
7
- }
1
+ export interface IRentalPriceAttr {
2
+ PriceId: string;
3
+ RetailPrice: number;
4
+ Currency: string;
5
+ PromoCode: string;
6
+ Remarks: string;
7
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=rental-price-attr.interface.js.map
@@ -1,3 +1,3 @@
1
- import { RentalModel } from './rental.entity';
2
- import { RentalPriceModel } from './rental-price.entity';
3
- export { RentalModel, RentalPriceModel };
1
+ import { RentalModel } from './rental.entity';
2
+ import { RentalPriceModel } from './rental-price.entity';
3
+ export { RentalModel, RentalPriceModel };