@tomei/rental 0.19.0-staging.1 → 0.19.0-staging.2
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/index.d.ts +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/src/ClassMappings/ItemClassMap.d.ts +4 -0
- package/dist/src/ClassMappings/ItemClassMap.js +8 -0
- package/dist/src/ClassMappings/ItemClassMap.js.map +1 -0
- package/dist/src/ClassMappings/index.d.ts +2 -0
- package/dist/src/ClassMappings/index.js +6 -0
- package/dist/src/ClassMappings/index.js.map +1 -0
- package/dist/src/components/agreement/agreement.d.ts +27 -0
- package/dist/src/components/agreement/agreement.js +137 -0
- package/dist/src/components/agreement/agreement.js.map +1 -0
- package/dist/src/components/agreement/agreement.repository.d.ts +8 -0
- package/dist/src/components/agreement/agreement.repository.js +67 -0
- package/dist/src/components/agreement/agreement.repository.js.map +1 -0
- package/dist/src/components/agreement-history/agreement-history.d.ts +17 -0
- package/dist/src/components/agreement-history/agreement-history.js +51 -0
- package/dist/src/components/agreement-history/agreement-history.js.map +1 -0
- package/dist/src/components/agreement-history/agreement-history.repository.d.ts +8 -0
- package/dist/src/components/agreement-history/agreement-history.repository.js +67 -0
- package/dist/src/components/agreement-history/agreement-history.repository.js.map +1 -0
- package/dist/src/components/agreement-signature/agreement-signature.d.ts +27 -0
- package/dist/src/components/agreement-signature/agreement-signature.js +112 -0
- package/dist/src/components/agreement-signature/agreement-signature.js.map +1 -0
- package/dist/src/components/agreement-signature/agreement-signature.repository.d.ts +8 -0
- package/dist/src/components/agreement-signature/agreement-signature.repository.js +68 -0
- package/dist/src/components/agreement-signature/agreement-signature.repository.js.map +1 -0
- package/dist/src/components/booking/booking.d.ts +46 -0
- package/dist/src/components/booking/booking.js +314 -0
- package/dist/src/components/booking/booking.js.map +1 -0
- package/dist/src/components/booking/booking.repository.d.ts +8 -0
- package/dist/src/components/booking/booking.repository.js +67 -0
- package/dist/src/components/booking/booking.repository.js.map +1 -0
- 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.repository.d.ts +8 -0
- package/dist/src/components/rental/rental.repository.js +67 -0
- package/dist/src/components/rental/rental.repository.js.map +1 -0
- package/dist/src/components/rental-price/rental-price.d.ts +18 -0
- package/dist/src/components/rental-price/rental-price.js +79 -0
- package/dist/src/components/rental-price/rental-price.js.map +1 -0
- package/dist/src/components/rental-price/rental-price.repository.d.ts +8 -0
- package/dist/src/components/rental-price/rental-price.repository.js +67 -0
- package/dist/src/components/rental-price/rental-price.repository.js.map +1 -0
- package/dist/src/database.d.ts +4 -0
- package/dist/src/database.js +29 -0
- package/dist/src/database.js.map +1 -0
- 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/aggrement-status.enum.d.ts +5 -0
- package/dist/src/enum/aggrement-status.enum.js +10 -0
- package/dist/src/enum/aggrement-status.enum.js.map +1 -0
- package/dist/src/enum/agreement-signature-status.enum.d.ts +4 -0
- package/dist/src/enum/agreement-signature-status.enum.js +9 -0
- package/dist/src/enum/agreement-signature-status.enum.js.map +1 -0
- package/dist/src/enum/booking.enum.d.ts +5 -0
- package/dist/src/enum/booking.enum.js +10 -0
- package/dist/src/enum/booking.enum.js.map +1 -0
- package/dist/src/enum/hirer-type.enum.d.ts +4 -0
- package/dist/src/enum/hirer-type.enum.js +9 -0
- package/dist/src/enum/hirer-type.enum.js.map +1 -0
- package/dist/src/enum/index.d.ts +7 -0
- package/dist/src/enum/index.js +16 -0
- package/dist/src/enum/index.js.map +1 -0
- package/dist/src/enum/rental-status.enum.d.ts +9 -0
- package/dist/src/enum/rental-status.enum.js +14 -0
- package/dist/src/enum/rental-status.enum.js.map +1 -0
- package/dist/src/index.d.ts +20 -0
- package/dist/src/index.js +53 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/interfaces/agreemeent-signature-attr.interface.d.ts +14 -0
- package/dist/src/interfaces/agreemeent-signature-attr.interface.js +3 -0
- package/dist/src/interfaces/agreemeent-signature-attr.interface.js.map +1 -0
- package/dist/src/interfaces/agreement-attr.interface.d.ts +7 -0
- package/dist/src/interfaces/agreement-attr.interface.js +3 -0
- package/dist/src/interfaces/agreement-attr.interface.js.map +1 -0
- package/dist/src/interfaces/agreement-history-attr.interface.d.ts +7 -0
- package/dist/src/interfaces/agreement-history-attr.interface.js +3 -0
- package/dist/src/interfaces/agreement-history-attr.interface.js.map +1 -0
- package/dist/src/interfaces/booking-attr.interface.d.ts +18 -0
- package/dist/src/interfaces/booking-attr.interface.js +3 -0
- package/dist/src/interfaces/booking-attr.interface.js.map +1 -0
- package/dist/src/interfaces/booking-find-all-search-attr.interface.d.ts +12 -0
- package/dist/src/interfaces/booking-find-all-search-attr.interface.js +3 -0
- package/dist/src/interfaces/booking-find-all-search-attr.interface.js.map +1 -0
- package/dist/src/interfaces/index.d.ts +9 -0
- package/dist/src/interfaces/index.js +3 -0
- package/dist/src/interfaces/index.js.map +1 -0
- 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 +24 -0
- package/dist/src/interfaces/rental-attr.interface.js +3 -0
- package/dist/src/interfaces/rental-attr.interface.js.map +1 -0
- package/dist/src/interfaces/rental-find-all-search-attr.interface.d.ts +10 -0
- package/dist/src/interfaces/rental-find-all-search-attr.interface.js +3 -0
- package/dist/src/interfaces/rental-find-all-search-attr.interface.js.map +1 -0
- package/dist/src/interfaces/rental-price-attr.interface.d.ts +7 -0
- package/dist/src/interfaces/rental-price-attr.interface.js +3 -0
- package/dist/src/interfaces/rental-price-attr.interface.js.map +1 -0
- package/dist/src/interfaces/response-hirer-signature-attr.interface.d.ts +14 -0
- package/dist/src/interfaces/response-hirer-signature-attr.interface.js +3 -0
- package/dist/src/interfaces/response-hirer-signature-attr.interface.js.map +1 -0
- package/dist/src/models/agreement-history.entity.d.ts +10 -0
- package/dist/src/models/agreement-history.entity.js +65 -0
- package/dist/src/models/agreement-history.entity.js.map +1 -0
- package/dist/src/models/agreement-signature.entity.d.ts +18 -0
- package/dist/src/models/agreement-signature.entity.js +101 -0
- package/dist/src/models/agreement-signature.entity.js.map +1 -0
- package/dist/src/models/agreement.entity.d.ts +14 -0
- package/dist/src/models/agreement.entity.js +70 -0
- package/dist/src/models/agreement.entity.js.map +1 -0
- package/dist/src/models/booking.entity.d.ts +21 -0
- package/dist/src/models/booking.entity.js +128 -0
- package/dist/src/models/booking.entity.js.map +1 -0
- package/dist/src/models/index.d.ts +8 -0
- package/dist/src/models/index.js +18 -0
- package/dist/src/models/index.js.map +1 -0
- 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-price.entity.d.ts +8 -0
- package/dist/src/models/rental-price.entity.js +59 -0
- package/dist/src/models/rental-price.entity.js.map +1 -0
- package/dist/src/models/rental.entity.d.ts +29 -0
- package/dist/src/models/rental.entity.js +160 -0
- package/dist/src/models/rental.entity.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/agreement/agreement.ts +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"joint-hirer.js","sourceRoot":"","sources":["../../../../src/components/joint-hirer/joint-hirer.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA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,EAAE,IAAI,CAAC,WAAW;oBAC7B,SAAS,EAAE,IAAI,CAAC,SAAS;oBACzB,WAAW,EAAE,IAAI,CAAC,WAAW;oBAC7B,SAAS,EAAE,IAAI,CAAC,SAAS;iBAC1B,CAAC;gBAGF,MAAM,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,gBAAgB,EAAE;oBACpD,WAAW,EAAE,aAAa;iBAC3B,CAAC,CAAC;gBAGH,MAAM,QAAQ,GAAG,IAAI,2BAAQ,EAAE,CAAC;gBAChC,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;gBACrC,QAAQ,CAAC,MAAM,GAAG,6BAAU,CAAC,MAAM,CAAC;gBACpC,QAAQ,CAAC,WAAW,GAAG,iBAAiB,CAAC;gBACzC,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;gBAClC,QAAQ,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;gBACtC,QAAQ,CAAC,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;gBAChD,QAAQ,CAAC,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;gBAE7D,MAAM,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;gBAEzD,OAAO,IAAI,CAAC;YACd,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;KAAA;;AAhIH,gCAiIC;AA5GkB,sBAAW,GAAG,IAAI,6CAAoB,EAAE,AAA7B,CAA8B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RepositoryBase, IRepositoryBase } from '@tomei/general';
|
|
2
|
+
import { JointHirerModel } from '../../models/joint-hirer.entity';
|
|
3
|
+
export declare class JointHirerRepository extends RepositoryBase<JointHirerModel> implements IRepositoryBase<JointHirerModel> {
|
|
4
|
+
constructor();
|
|
5
|
+
findByPk(id: string, transaction?: any): Promise<JointHirerModel | null>;
|
|
6
|
+
delete(hirerId: string, dbTransaction?: any): Promise<void>;
|
|
7
|
+
findAndCountAll(options?: any): Promise<any>;
|
|
8
|
+
}
|
|
@@ -0,0 +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.JointHirerRepository = void 0;
|
|
13
|
+
const general_1 = require("@tomei/general");
|
|
14
|
+
const joint_hirer_entity_1 = require("../../models/joint-hirer.entity");
|
|
15
|
+
class JointHirerRepository extends general_1.RepositoryBase {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(joint_hirer_entity_1.JointHirerModel);
|
|
18
|
+
}
|
|
19
|
+
findByPk(id, transaction) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
try {
|
|
22
|
+
const result = yield joint_hirer_entity_1.JointHirerModel.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(hirerId, dbTransaction) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
try {
|
|
35
|
+
const options = {
|
|
36
|
+
where: {
|
|
37
|
+
HirerId: hirerId,
|
|
38
|
+
},
|
|
39
|
+
transaction: dbTransaction,
|
|
40
|
+
};
|
|
41
|
+
yield joint_hirer_entity_1.JointHirerModel.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 jointHirers;
|
|
52
|
+
if (options) {
|
|
53
|
+
jointHirers = yield joint_hirer_entity_1.JointHirerModel.findAndCountAll(options);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
jointHirers = yield joint_hirer_entity_1.JointHirerModel.findAndCountAll();
|
|
57
|
+
}
|
|
58
|
+
return jointHirers;
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
throw new Error(`An Error occured when retriving : ${error.message}`);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.JointHirerRepository = JointHirerRepository;
|
|
67
|
+
//# sourceMappingURL=joint-hirer.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"joint-hirer.repository.js","sourceRoot":"","sources":["../../../../src/components/joint-hirer/joint-hirer.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAiE;AACjE,wEAAkE;AAElE,MAAa,oBACX,SAAQ,wBAA+B;IAGvC;QACE,KAAK,CAAC,oCAAe,CAAC,CAAC;IACzB,CAAC;IAEK,QAAQ,CACZ,EAAU,EACV,WAAiB;;YAEjB,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,oCAAe,CAAC,QAAQ,CAAC,EAAE,EAAE;oBAChD,WAAW,EAAE,WAAW;iBACzB,CAAC,CAAC;gBAEH,OAAO,MAAM,CAAC;YAChB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,oCAAoC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACvE,CAAC;QACH,CAAC;KAAA;IAEK,MAAM,CAAC,OAAe,EAAE,aAAmB;;YAC/C,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG;oBACd,KAAK,EAAE;wBACL,OAAO,EAAE,OAAO;qBACjB;oBACD,WAAW,EAAE,aAAa;iBAC3B,CAAC;gBACF,MAAM,oCAAe,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACzC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,kCAAkC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACrE,CAAC;QACH,CAAC;KAAA;IAEK,eAAe,CAAC,OAAa;;YACjC,IAAI,CAAC;gBACH,IAAI,WAAgB,CAAC;gBACrB,IAAI,OAAO,EAAE,CAAC;oBACZ,WAAW,GAAG,MAAM,oCAAe,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;gBAC/D,CAAC;qBAAM,CAAC;oBACN,WAAW,GAAG,MAAM,oCAAe,CAAC,eAAe,EAAE,CAAC;gBACxD,CAAC;gBACD,OAAO,WAAW,CAAC;YACrB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,qCAAqC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACxE,CAAC;QACH,CAAC;KAAA;CACF;AAlDD,oDAkDC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RepositoryBase, IRepositoryBase } from '@tomei/general';
|
|
2
|
+
import { RentalModel } from '../../models/rental.entity';
|
|
3
|
+
export declare class RentalRepository extends RepositoryBase<RentalModel> implements IRepositoryBase<RentalModel> {
|
|
4
|
+
constructor();
|
|
5
|
+
findByPk(id: string, transaction?: any): Promise<RentalModel | null>;
|
|
6
|
+
delete(RentalId: string, dbTransaction?: any): Promise<void>;
|
|
7
|
+
findAndCountAll(options?: any): Promise<any>;
|
|
8
|
+
}
|
|
@@ -0,0 +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.RentalRepository = void 0;
|
|
13
|
+
const general_1 = require("@tomei/general");
|
|
14
|
+
const rental_entity_1 = require("../../models/rental.entity");
|
|
15
|
+
class RentalRepository extends general_1.RepositoryBase {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(rental_entity_1.RentalModel);
|
|
18
|
+
}
|
|
19
|
+
findByPk(id, transaction) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
try {
|
|
22
|
+
const result = yield rental_entity_1.RentalModel.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(RentalId, dbTransaction) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
try {
|
|
35
|
+
const options = {
|
|
36
|
+
where: {
|
|
37
|
+
RentalId: RentalId,
|
|
38
|
+
},
|
|
39
|
+
transaction: dbTransaction,
|
|
40
|
+
};
|
|
41
|
+
yield rental_entity_1.RentalModel.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 Rentals;
|
|
52
|
+
if (options) {
|
|
53
|
+
Rentals = yield rental_entity_1.RentalModel.findAndCountAll(options);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
Rentals = yield rental_entity_1.RentalModel.findAndCountAll();
|
|
57
|
+
}
|
|
58
|
+
return Rentals;
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
throw new Error(`An Error occured when retriving : ${error.message}`);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.RentalRepository = RentalRepository;
|
|
67
|
+
//# sourceMappingURL=rental.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rental.repository.js","sourceRoot":"","sources":["../../../../src/components/rental/rental.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAiE;AACjE,8DAAyD;AAEzD,MAAa,gBACX,SAAQ,wBAA2B;IAGnC;QACE,KAAK,CAAC,2BAAW,CAAC,CAAC;IACrB,CAAC;IAEK,QAAQ,CAAC,EAAU,EAAE,WAAiB;;YAC1C,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,2BAAW,CAAC,QAAQ,CAAC,EAAE,EAAE;oBAC5C,WAAW,EAAE,WAAW;iBACzB,CAAC,CAAC;gBAEH,OAAO,MAAM,CAAC;YAChB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,oCAAoC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACvE,CAAC;QACH,CAAC;KAAA;IAEK,MAAM,CAAC,QAAgB,EAAE,aAAmB;;YAChD,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG;oBACd,KAAK,EAAE;wBACL,QAAQ,EAAE,QAAQ;qBACnB;oBACD,WAAW,EAAE,aAAa;iBAC3B,CAAC;gBACF,MAAM,2BAAW,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACrC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,kCAAkC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACrE,CAAC;QACH,CAAC;KAAA;IAEK,eAAe,CAAC,OAAa;;YACjC,IAAI,CAAC;gBACH,IAAI,OAAY,CAAC;gBACjB,IAAI,OAAO,EAAE,CAAC;oBACZ,OAAO,GAAG,MAAM,2BAAW,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;gBACvD,CAAC;qBAAM,CAAC;oBACN,OAAO,GAAG,MAAM,2BAAW,CAAC,eAAe,EAAE,CAAC;gBAChD,CAAC;gBACD,OAAO,OAAO,CAAC;YACjB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,qCAAqC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACxE,CAAC;QACH,CAAC;KAAA;CACF;AA/CD,4CA+CC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ObjectBase } from '@tomei/general';
|
|
2
|
+
import { LoginUser } from '@tomei/sso';
|
|
3
|
+
export declare class RentalPrice extends ObjectBase {
|
|
4
|
+
ObjectId: string;
|
|
5
|
+
ObjectName: string;
|
|
6
|
+
ObjectType: string;
|
|
7
|
+
TableName: string;
|
|
8
|
+
RetailPrice: number;
|
|
9
|
+
Currency: string;
|
|
10
|
+
PromoCode: string;
|
|
11
|
+
Remarks: string;
|
|
12
|
+
get PriceId(): string;
|
|
13
|
+
set PriceId(value: string);
|
|
14
|
+
private static _Repo;
|
|
15
|
+
private constructor();
|
|
16
|
+
static init(dbTransaction?: any, priceId?: string): Promise<RentalPrice>;
|
|
17
|
+
create(loginUser: LoginUser, dbTransaction?: any): Promise<this>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
class RentalPrice extends general_1.ObjectBase {
|
|
17
|
+
get PriceId() {
|
|
18
|
+
return this.ObjectId;
|
|
19
|
+
}
|
|
20
|
+
set PriceId(value) {
|
|
21
|
+
this.ObjectId = value;
|
|
22
|
+
}
|
|
23
|
+
constructor(rentalPriceAttr) {
|
|
24
|
+
super();
|
|
25
|
+
this.ObjectType = 'RentalPrice';
|
|
26
|
+
if (rentalPriceAttr) {
|
|
27
|
+
this.PriceId = rentalPriceAttr.PriceId;
|
|
28
|
+
this.RetailPrice = rentalPriceAttr.RetailPrice;
|
|
29
|
+
this.Currency = rentalPriceAttr.Currency;
|
|
30
|
+
this.PromoCode = rentalPriceAttr.PromoCode;
|
|
31
|
+
this.Remarks = rentalPriceAttr.Remarks;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
static init(dbTransaction, priceId) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
try {
|
|
37
|
+
if (priceId) {
|
|
38
|
+
const rentalPrice = yield RentalPrice._Repo.findByPk(priceId, dbTransaction);
|
|
39
|
+
if (rentalPrice) {
|
|
40
|
+
return new RentalPrice(rentalPrice);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
throw new general_1.ClassError('RentalPrice', 'RentalPriceErrMsg', 'RentalPrice Not Found');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return new RentalPrice();
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
throw new general_1.ClassError('RentalPrice', 'RentalPriceErrMsg', 'Failed To Initialize RentalPrice');
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
create(loginUser, dbTransaction) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
try {
|
|
56
|
+
const systemCode = config_1.ApplicationConfig.getComponentConfigValue('system-code');
|
|
57
|
+
const isPrivileged = yield loginUser.checkPrivileges(systemCode, 'Rental - Create');
|
|
58
|
+
if (!isPrivileged) {
|
|
59
|
+
throw new general_1.ClassError('RentalPrice', 'RentalPriceErrMsg01', "You do not have 'Rental - Create' privilege.");
|
|
60
|
+
}
|
|
61
|
+
this.PriceId = this.createId();
|
|
62
|
+
yield RentalPrice._Repo.create({
|
|
63
|
+
PriceId: this.PriceId,
|
|
64
|
+
RetailPrice: this.RetailPrice,
|
|
65
|
+
Currency: this.Currency,
|
|
66
|
+
PromoCode: this.PromoCode,
|
|
67
|
+
Remarks: this.Remarks,
|
|
68
|
+
}, dbTransaction);
|
|
69
|
+
return this;
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
throw error;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.RentalPrice = RentalPrice;
|
|
78
|
+
RentalPrice._Repo = new rental_price_repository_1.RentalPriceRepository();
|
|
79
|
+
//# sourceMappingURL=rental-price.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rental-price.js","sourceRoot":"","sources":["../../../../src/components/rental-price/rental-price.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAwD;AACxD,uEAAkE;AAGlE,0CAAkD;AAElD,MAAa,WAAY,SAAQ,oBAAU;IAUzC,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,IAAI,OAAO,CAAC,KAAa;QACvB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAID,YAAoB,eAAkC;QACpD,KAAK,EAAE,CAAC;QAlBV,eAAU,GAAG,aAAa,CAAC;QAmBzB,IAAI,eAAe,EAAE,CAAC;YACpB,IAAI,CAAC,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC;YACvC,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,WAAW,CAAC;YAC/C,IAAI,CAAC,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC;YACzC,IAAI,CAAC,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC;YAC3C,IAAI,CAAC,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC;QACzC,CAAC;IACH,CAAC;IAEM,MAAM,CAAO,IAAI,CAAC,aAAmB,EAAE,OAAgB;;YAC5D,IAAI,CAAC;gBACH,IAAI,OAAO,EAAE,CAAC;oBACZ,MAAM,WAAW,GAAG,MAAM,WAAW,CAAC,KAAK,CAAC,QAAQ,CAClD,OAAO,EACP,aAAa,CACd,CAAC;oBACF,IAAI,WAAW,EAAE,CAAC;wBAChB,OAAO,IAAI,WA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 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +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;
|
|
67
|
+
//# sourceMappingURL=rental-price.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rental-price.repository.js","sourceRoot":"","sources":["../../../../src/components/rental-price/rental-price.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAiE;AACjE,0EAAoE;AAEpE,MAAa,qBACX,SAAQ,wBA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kDC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.init = init;
|
|
4
|
+
exports.getConnection = getConnection;
|
|
5
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
6
|
+
const rental_entity_1 = require("./models/rental.entity");
|
|
7
|
+
const rental_price_entity_1 = require("./models/rental-price.entity");
|
|
8
|
+
const booking_entity_1 = require("./models/booking.entity");
|
|
9
|
+
const joint_hirer_entity_1 = require("./models/joint-hirer.entity");
|
|
10
|
+
const agreement_entity_1 = require("./models/agreement.entity");
|
|
11
|
+
const agreement_signature_entity_1 = require("./models/agreement-signature.entity");
|
|
12
|
+
const agreement_history_entity_1 = require("./models/agreement-history.entity");
|
|
13
|
+
let sequelize;
|
|
14
|
+
function init(sequelizeOptions) {
|
|
15
|
+
sequelize = new sequelize_typescript_1.Sequelize(sequelizeOptions);
|
|
16
|
+
sequelize.addModels([
|
|
17
|
+
rental_entity_1.RentalModel,
|
|
18
|
+
rental_price_entity_1.RentalPriceModel,
|
|
19
|
+
booking_entity_1.BookingModel,
|
|
20
|
+
joint_hirer_entity_1.JointHirerModel,
|
|
21
|
+
agreement_entity_1.AgreementModel,
|
|
22
|
+
agreement_signature_entity_1.AgreementSignatureModel,
|
|
23
|
+
agreement_history_entity_1.AgreementHistoryModel,
|
|
24
|
+
]);
|
|
25
|
+
}
|
|
26
|
+
function getConnection() {
|
|
27
|
+
return sequelize;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=database.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.js","sourceRoot":"","sources":["../../src/database.ts"],"names":[],"mappings":";;AA8BS,oBAAI;AAAE,sCAAa;AA9B5B,+DAAmE;AACnE,0DAAqD;AACrD,sEAAgE;AAChE,4DAAuD;AACvD,oEAA8D;AAC9D,gEAA2D;AAC3D,oFAA8E;AAC9E,gFAA0E;AAE1E,IAAI,SAAoB,CAAC;AAEzB,SAAS,IAAI,CAAC,gBAAkC;IAC9C,SAAS,GAAG,IAAI,gCAAS,CAAC,gBAAgB,CAAC,CAAC;IAE5C,SAAS,CAAC,SAAS,CAAC;QAElB,2BAAW;QACX,sCAAgB;QAChB,6BAAY;QACZ,oCAAe;QACf,iCAAc;QACd,oDAAuB;QACvB,gDAAqB;KACtB,CAAC,CAAC;AACL,CAAC;AAED,SAAS,aAAa;IACpB,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RentalAccountTypeEnum = void 0;
|
|
4
|
+
var RentalAccountTypeEnum;
|
|
5
|
+
(function (RentalAccountTypeEnum) {
|
|
6
|
+
RentalAccountTypeEnum["SINGLE"] = "Single";
|
|
7
|
+
RentalAccountTypeEnum["JOINT"] = "Joint";
|
|
8
|
+
})(RentalAccountTypeEnum || (exports.RentalAccountTypeEnum = RentalAccountTypeEnum = {}));
|
|
9
|
+
//# sourceMappingURL=account-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-type.enum.js","sourceRoot":"","sources":["../../../src/enum/account-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB,wCAAe,CAAA;AACjB,CAAC,EAHW,qBAAqB,qCAArB,qBAAqB,QAGhC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AggrementStatusEnum = void 0;
|
|
4
|
+
var AggrementStatusEnum;
|
|
5
|
+
(function (AggrementStatusEnum) {
|
|
6
|
+
AggrementStatusEnum["NOT_GENERATED"] = "Not Generated";
|
|
7
|
+
AggrementStatusEnum["GENERATED"] = "Generated";
|
|
8
|
+
AggrementStatusEnum["SIGNED"] = "Signed";
|
|
9
|
+
})(AggrementStatusEnum || (exports.AggrementStatusEnum = AggrementStatusEnum = {}));
|
|
10
|
+
//# sourceMappingURL=aggrement-status.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggrement-status.enum.js","sourceRoot":"","sources":["../../../src/enum/aggrement-status.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,sDAA+B,CAAA;IAC/B,8CAAuB,CAAA;IACvB,wCAAiB,CAAA;AACnB,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AgreementSignatureStatusEnum = void 0;
|
|
4
|
+
var AgreementSignatureStatusEnum;
|
|
5
|
+
(function (AgreementSignatureStatusEnum) {
|
|
6
|
+
AgreementSignatureStatusEnum["PENDING"] = "Pending";
|
|
7
|
+
AgreementSignatureStatusEnum["SIGNED"] = "Signed";
|
|
8
|
+
})(AgreementSignatureStatusEnum || (exports.AgreementSignatureStatusEnum = AgreementSignatureStatusEnum = {}));
|
|
9
|
+
//# sourceMappingURL=agreement-signature-status.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agreement-signature-status.enum.js","sourceRoot":"","sources":["../../../src/enum/agreement-signature-status.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,4BAGX;AAHD,WAAY,4BAA4B;IACtC,mDAAmB,CAAA;IACnB,iDAAiB,CAAA;AACnB,CAAC,EAHW,4BAA4B,4CAA5B,4BAA4B,QAGvC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BookingStatusEnum = void 0;
|
|
4
|
+
var BookingStatusEnum;
|
|
5
|
+
(function (BookingStatusEnum) {
|
|
6
|
+
BookingStatusEnum["CONFIRMED"] = "Confirmed";
|
|
7
|
+
BookingStatusEnum["PENDING"] = "Pending";
|
|
8
|
+
BookingStatusEnum["CANCELLED"] = "Cancelled";
|
|
9
|
+
})(BookingStatusEnum || (exports.BookingStatusEnum = BookingStatusEnum = {}));
|
|
10
|
+
//# sourceMappingURL=booking.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"booking.enum.js","sourceRoot":"","sources":["../../../src/enum/booking.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,4CAAuB,CAAA;IACvB,wCAAmB,CAAA;IACnB,4CAAuB,CAAA;AACzB,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HirerTypeEnum = void 0;
|
|
4
|
+
var HirerTypeEnum;
|
|
5
|
+
(function (HirerTypeEnum) {
|
|
6
|
+
HirerTypeEnum["PRIMARY"] = "Primary";
|
|
7
|
+
HirerTypeEnum["JOINT"] = "Joint";
|
|
8
|
+
})(HirerTypeEnum || (exports.HirerTypeEnum = HirerTypeEnum = {}));
|
|
9
|
+
//# sourceMappingURL=hirer-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hirer-type.enum.js","sourceRoot":"","sources":["../../../src/enum/hirer-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,gCAAe,CAAA;AACjB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RentalStatusEnum } from './rental-status.enum';
|
|
2
|
+
import { BookingStatusEnum } from './booking.enum';
|
|
3
|
+
import { RentalAccountTypeEnum } from './account-type.enum';
|
|
4
|
+
import { AggrementStatusEnum } from './aggrement-status.enum';
|
|
5
|
+
import { AgreementSignatureStatusEnum } from './agreement-signature-status.enum';
|
|
6
|
+
import { HirerTypeEnum } from './hirer-type.enum';
|
|
7
|
+
export { RentalStatusEnum, BookingStatusEnum, RentalAccountTypeEnum, AggrementStatusEnum, AgreementSignatureStatusEnum, HirerTypeEnum, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HirerTypeEnum = exports.AgreementSignatureStatusEnum = exports.AggrementStatusEnum = exports.RentalAccountTypeEnum = exports.BookingStatusEnum = 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
|
+
const booking_enum_1 = require("./booking.enum");
|
|
7
|
+
Object.defineProperty(exports, "BookingStatusEnum", { enumerable: true, get: function () { return booking_enum_1.BookingStatusEnum; } });
|
|
8
|
+
const account_type_enum_1 = require("./account-type.enum");
|
|
9
|
+
Object.defineProperty(exports, "RentalAccountTypeEnum", { enumerable: true, get: function () { return account_type_enum_1.RentalAccountTypeEnum; } });
|
|
10
|
+
const aggrement_status_enum_1 = require("./aggrement-status.enum");
|
|
11
|
+
Object.defineProperty(exports, "AggrementStatusEnum", { enumerable: true, get: function () { return aggrement_status_enum_1.AggrementStatusEnum; } });
|
|
12
|
+
const agreement_signature_status_enum_1 = require("./agreement-signature-status.enum");
|
|
13
|
+
Object.defineProperty(exports, "AgreementSignatureStatusEnum", { enumerable: true, get: function () { return agreement_signature_status_enum_1.AgreementSignatureStatusEnum; } });
|
|
14
|
+
const hirer_type_enum_1 = require("./hirer-type.enum");
|
|
15
|
+
Object.defineProperty(exports, "HirerTypeEnum", { enumerable: true, get: function () { return hirer_type_enum_1.HirerTypeEnum; } });
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/enum/index.ts"],"names":[],"mappings":";;;AAAA,6DAAwD;AAQtD,iGARO,qCAAgB,OAQP;AAPlB,iDAAmD;AAQjD,kGARO,gCAAiB,OAQP;AAPnB,2DAA4D;AAQ1D,sGARO,yCAAqB,OAQP;AAPvB,mEAA8D;AAQ5D,oGARO,2CAAmB,OAQP;AAPrB,uFAAiF;AAQ/E,6GARO,8DAA4B,OAQP;AAP9B,uDAAkD;AAQhD,8FARO,+BAAa,OAQP"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RentalStatusEnum = void 0;
|
|
4
|
+
var RentalStatusEnum;
|
|
5
|
+
(function (RentalStatusEnum) {
|
|
6
|
+
RentalStatusEnum["RESERVED"] = "Reserved";
|
|
7
|
+
RentalStatusEnum["ACTIVE"] = "Active";
|
|
8
|
+
RentalStatusEnum["SUSPENDED"] = "Suspended";
|
|
9
|
+
RentalStatusEnum["CANCELLED"] = "Cancelled";
|
|
10
|
+
RentalStatusEnum["TERMINATED"] = "Terminated";
|
|
11
|
+
RentalStatusEnum["PENDING_SIGNING"] = "Pending Signing";
|
|
12
|
+
RentalStatusEnum["PENDING_KEY_COLLECTION"] = "Pending Key Collection";
|
|
13
|
+
})(RentalStatusEnum || (exports.RentalStatusEnum = RentalStatusEnum = {}));
|
|
14
|
+
//# sourceMappingURL=rental-status.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rental-status.enum.js","sourceRoot":"","sources":["../../../src/enum/rental-status.enum.ts"],"names":[],"mappings":";;;AAGA,IAAY,gBAmCX;AAnCD,WAAY,gBAAgB;IAI1B,yCAAqB,CAAA;IAKrB,qCAAiB,CAAA;IAKjB,2CAAuB,CAAA;IAKvB,2CAAuB,CAAA;IAKvB,6CAAyB,CAAA;IAKzB,uDAAmC,CAAA;IAKnC,qEAAiD,CAAA;AACnD,CAAC,EAnCW,gBAAgB,gCAAhB,gBAAgB,QAmC3B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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 { Booking } from './components/booking/booking';
|
|
6
|
+
import { BookingRepository } from './components/booking/booking.repository';
|
|
7
|
+
import { JointHirer } from './components/joint-hirer/joint-hirer';
|
|
8
|
+
import { JointHirerRepository } from './components/joint-hirer/joint-hirer.repository';
|
|
9
|
+
import { Agreement } from './components/agreement/agreement';
|
|
10
|
+
import { AgreementRepository } from './components/agreement/agreement.repository';
|
|
11
|
+
import { AgreementSignature } from './components/agreement-signature/agreement-signature';
|
|
12
|
+
import { AgreementSignatureRepository } from './components/agreement-signature/agreement-signature.repository';
|
|
13
|
+
import { AgreementHistory } from './components/agreement-history/agreement-history';
|
|
14
|
+
import { AgreementHistoryRepository } from './components/agreement-history/agreement-history.repository';
|
|
15
|
+
import { ItemClassMap } from './ClassMappings/ItemClassMap';
|
|
16
|
+
import * as rentalDb from './database';
|
|
17
|
+
export * from './interfaces';
|
|
18
|
+
export * from './models';
|
|
19
|
+
export * from './enum';
|
|
20
|
+
export { Rental, RentalPrice, RentalRepository, RentalPriceRepository, Booking, BookingRepository, rentalDb, JointHirer, JointHirerRepository, Agreement, AgreementRepository, AgreementSignature, AgreementSignatureRepository, AgreementHistory, AgreementHistoryRepository, ItemClassMap, };
|