@tomei/rental 0.5.1 → 0.6.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/dist/src/components/booking/booking.js +1 -1
- package/dist/src/components/joint-hirer/joint-hirer.d.ts +23 -0
- package/dist/src/components/joint-hirer/joint-hirer.js +106 -0
- package/dist/src/components/joint-hirer/joint-hirer.js.map +1 -0
- package/dist/src/components/joint-hirer/joint-hirer.repository.d.ts +8 -0
- package/dist/src/components/joint-hirer/joint-hirer.repository.js +67 -0
- package/dist/src/components/joint-hirer/joint-hirer.repository.js.map +1 -0
- package/dist/src/components/rental/rental.d.ts +9 -3
- package/dist/src/components/rental/rental.js +13 -1
- package/dist/src/components/rental/rental.js.map +1 -1
- package/dist/src/database.js +2 -0
- package/dist/src/database.js.map +1 -1
- package/dist/src/enum/account-type.enum.d.ts +4 -0
- package/dist/src/enum/account-type.enum.js +9 -0
- package/dist/src/enum/account-type.enum.js.map +1 -0
- package/dist/src/enum/index.d.ts +2 -1
- package/dist/src/enum/index.js +3 -1
- package/dist/src/enum/index.js.map +1 -1
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.js +5 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/interfaces/joint-hirer-attr.interface.d.ts +10 -0
- package/dist/src/interfaces/joint-hirer-attr.interface.js +3 -0
- package/dist/src/interfaces/joint-hirer-attr.interface.js.map +1 -0
- package/dist/src/interfaces/rental-attr.interface.d.ts +2 -0
- package/dist/src/models/index.d.ts +2 -1
- package/dist/src/models/index.js +3 -1
- package/dist/src/models/index.js.map +1 -1
- package/dist/src/models/joint-hirer.entity.d.ts +13 -0
- package/dist/src/models/joint-hirer.entity.js +79 -0
- package/dist/src/models/joint-hirer.entity.js.map +1 -0
- package/dist/src/models/rental.entity.d.ts +4 -0
- package/dist/src/models/rental.entity.js +13 -0
- package/dist/src/models/rental.entity.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/migrations/joint-hirer-table-migration.js +52 -0
- package/migrations/rental-table-migrations.js +4 -0
- package/package.json +1 -1
- package/src/components/booking/booking.ts +1 -1
- package/src/components/joint-hirer/joint-hirer.repository.ts +54 -0
- package/src/components/joint-hirer/joint-hirer.ts +137 -0
- package/src/components/rental/rental.ts +20 -2
- package/src/database.ts +2 -0
- package/src/enum/account-type.enum.ts +4 -0
- package/src/enum/index.ts +2 -1
- package/src/index.ts +4 -0
- package/src/interfaces/joint-hirer-attr.interface.ts +10 -0
- package/src/interfaces/rental-attr.interface.ts +2 -0
- package/src/models/index.ts +2 -1
- package/src/models/joint-hirer.entity.ts +63 -0
- package/src/models/rental.entity.ts +12 -0
|
@@ -0,0 +1,79 @@
|
|
|
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.JointHirerModel = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const rental_entity_1 = require("./rental.entity");
|
|
15
|
+
let JointHirerModel = class JointHirerModel extends sequelize_typescript_1.Model {
|
|
16
|
+
};
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, sequelize_typescript_1.Column)({
|
|
19
|
+
primaryKey: true,
|
|
20
|
+
allowNull: false,
|
|
21
|
+
type: sequelize_typescript_1.DataType.STRING(30),
|
|
22
|
+
}),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], JointHirerModel.prototype, "HirerId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, sequelize_typescript_1.ForeignKey)(() => rental_entity_1.RentalModel),
|
|
27
|
+
(0, sequelize_typescript_1.Column)({
|
|
28
|
+
allowNull: false,
|
|
29
|
+
type: sequelize_typescript_1.DataType.STRING(30),
|
|
30
|
+
}),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], JointHirerModel.prototype, "RentalId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, sequelize_typescript_1.Column)({
|
|
35
|
+
allowNull: false,
|
|
36
|
+
type: sequelize_typescript_1.DataType.STRING(30),
|
|
37
|
+
}),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], JointHirerModel.prototype, "CustomerId", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, sequelize_typescript_1.Column)({
|
|
42
|
+
allowNull: false,
|
|
43
|
+
type: sequelize_typescript_1.DataType.STRING(30),
|
|
44
|
+
}),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], JointHirerModel.prototype, "CustomerType", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, sequelize_typescript_1.Column)({
|
|
49
|
+
allowNull: false,
|
|
50
|
+
type: sequelize_typescript_1.DataType.STRING(30),
|
|
51
|
+
}),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], JointHirerModel.prototype, "CreatedById", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
sequelize_typescript_1.CreatedAt,
|
|
56
|
+
__metadata("design:type", Date)
|
|
57
|
+
], JointHirerModel.prototype, "CreatedAt", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, sequelize_typescript_1.Column)({
|
|
60
|
+
allowNull: false,
|
|
61
|
+
type: sequelize_typescript_1.DataType.STRING(30),
|
|
62
|
+
}),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], JointHirerModel.prototype, "UpdatedById", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
sequelize_typescript_1.UpdatedAt,
|
|
67
|
+
__metadata("design:type", Date)
|
|
68
|
+
], JointHirerModel.prototype, "UpdatedAt", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, sequelize_typescript_1.BelongsTo)(() => rental_entity_1.RentalModel),
|
|
71
|
+
__metadata("design:type", rental_entity_1.RentalModel)
|
|
72
|
+
], JointHirerModel.prototype, "RentalPrice", void 0);
|
|
73
|
+
JointHirerModel = __decorate([
|
|
74
|
+
(0, sequelize_typescript_1.Table)({
|
|
75
|
+
tableName: 'rental_JointHirer',
|
|
76
|
+
})
|
|
77
|
+
], JointHirerModel);
|
|
78
|
+
exports.JointHirerModel = JointHirerModel;
|
|
79
|
+
//# sourceMappingURL=joint-hirer.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"joint-hirer.entity.js","sourceRoot":"","sources":["../../../src/models/joint-hirer.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAS8B;AAC9B,mDAA8C;AAKvC,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,4BAAK;CA+CzC,CAAA;AA9CC;IAAC,IAAA,6BAAM,EAAC;QACN,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;gDACc;AAEhB;IAAC,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,2BAAW,CAAC;IAC7B,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;iDACe;AAEjB;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;mDACiB;AAEnB;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;qDACmB;AAErB;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;oDACkB;AAEpB;IAAC,gCAAS;8BACC,IAAI;kDAAC;AAEhB;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;oDACkB;AAEpB;IAAC,gCAAS;8BACC,IAAI;kDAAC;AAEhB;IAAC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,2BAAW,CAAC;8BAChB,2BAAW;oDAAC;AA9Cd,eAAe;IAH3B,IAAA,4BAAK,EAAC;QACL,SAAS,EAAE,mBAAmB;KAC/B,CAAC;GACW,eAAe,CA+C3B;AA/CY,0CAAe"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Model } from 'sequelize-typescript';
|
|
2
2
|
import { RentalPriceModel } from './rental-price.entity';
|
|
3
3
|
import { RentalStatusEnum } from '../enum/rental-status.enum';
|
|
4
|
+
import { JointHirerModel } from './joint-hirer.entity';
|
|
5
|
+
import { RentalAccountTypeEnum } from '../enum/account-type.enum';
|
|
4
6
|
export declare class RentalModel extends Model {
|
|
5
7
|
RentalId: string;
|
|
6
8
|
CustomerId: string;
|
|
@@ -15,9 +17,11 @@ export declare class RentalModel extends Model {
|
|
|
15
17
|
TerminateRemarks: string;
|
|
16
18
|
EscheatmentYN: string;
|
|
17
19
|
AgreementNo: string;
|
|
20
|
+
AccountType: RentalAccountTypeEnum;
|
|
18
21
|
CreatedById: string;
|
|
19
22
|
CreatedAt: Date;
|
|
20
23
|
UpdatedById: string;
|
|
21
24
|
UpdatedAt: Date;
|
|
22
25
|
RentalPrice: RentalPriceModel;
|
|
26
|
+
JointHirers: JointHirerModel[];
|
|
23
27
|
}
|
|
@@ -13,6 +13,8 @@ exports.RentalModel = void 0;
|
|
|
13
13
|
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
14
|
const rental_price_entity_1 = require("./rental-price.entity");
|
|
15
15
|
const rental_status_enum_1 = require("../enum/rental-status.enum");
|
|
16
|
+
const joint_hirer_entity_1 = require("./joint-hirer.entity");
|
|
17
|
+
const account_type_enum_1 = require("../enum/account-type.enum");
|
|
16
18
|
let RentalModel = class RentalModel extends sequelize_typescript_1.Model {
|
|
17
19
|
};
|
|
18
20
|
__decorate([
|
|
@@ -106,6 +108,13 @@ __decorate([
|
|
|
106
108
|
}),
|
|
107
109
|
__metadata("design:type", String)
|
|
108
110
|
], RentalModel.prototype, "AgreementNo", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, sequelize_typescript_1.Column)({
|
|
113
|
+
allowNull: false,
|
|
114
|
+
type: sequelize_typescript_1.DataType.STRING(10),
|
|
115
|
+
}),
|
|
116
|
+
__metadata("design:type", String)
|
|
117
|
+
], RentalModel.prototype, "AccountType", void 0);
|
|
109
118
|
__decorate([
|
|
110
119
|
(0, sequelize_typescript_1.Column)({
|
|
111
120
|
allowNull: false,
|
|
@@ -132,6 +141,10 @@ __decorate([
|
|
|
132
141
|
(0, sequelize_typescript_1.BelongsTo)(() => rental_price_entity_1.RentalPriceModel),
|
|
133
142
|
__metadata("design:type", rental_price_entity_1.RentalPriceModel)
|
|
134
143
|
], RentalModel.prototype, "RentalPrice", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, sequelize_typescript_1.HasMany)(() => joint_hirer_entity_1.JointHirerModel),
|
|
146
|
+
__metadata("design:type", Array)
|
|
147
|
+
], RentalModel.prototype, "JointHirers", void 0);
|
|
135
148
|
RentalModel = __decorate([
|
|
136
149
|
(0, sequelize_typescript_1.Table)({
|
|
137
150
|
tableName: 'rental_Rental',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rental.entity.js","sourceRoot":"","sources":["../../../src/models/rental.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+
|
|
1
|
+
{"version":3,"file":"rental.entity.js","sourceRoot":"","sources":["../../../src/models/rental.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAU8B;AAC9B,+DAAyD;AACzD,mEAA8D;AAC9D,6DAAuD;AACvD,iEAAkE;AAK3D,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,4BAAK;CA4GrC,CAAA;AA3GC;IAAC,IAAA,6BAAM,EAAC;QACN,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;6CACe;AAEjB;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;+CACiB;AAEnB;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;iDACmB;AAErB;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;2CACa;AAEf;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;6CACe;AAEjB;IAAC,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,sCAAgB,CAAC;IAClC,IAAA,6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