@tomei/rental 0.11.4 → 0.12.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/.husky/commit-msg +0 -0
- package/.husky/pre-commit +0 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -17
- package/dist/src/components/agreement/agreement.d.ts +17 -17
- package/dist/src/components/agreement/agreement.js +49 -49
- package/dist/src/components/agreement/agreement.js.map +1 -1
- package/dist/src/components/agreement/agreement.repository.d.ts +8 -8
- package/dist/src/components/agreement/agreement.repository.js +66 -66
- package/dist/src/components/agreement/agreement.repository.js.map +1 -1
- package/dist/src/components/booking/booking.d.ts +46 -45
- package/dist/src/components/booking/booking.js +313 -271
- package/dist/src/components/booking/booking.js.map +1 -1
- package/dist/src/components/booking/booking.repository.d.ts +8 -8
- package/dist/src/components/booking/booking.repository.js +66 -66
- package/dist/src/components/booking/booking.repository.js.map +1 -1
- package/dist/src/components/joint-hirer/joint-hirer.d.ts +23 -23
- package/dist/src/components/joint-hirer/joint-hirer.js +105 -105
- package/dist/src/components/joint-hirer/joint-hirer.js.map +1 -1
- package/dist/src/components/joint-hirer/joint-hirer.repository.d.ts +8 -8
- package/dist/src/components/joint-hirer/joint-hirer.repository.js +66 -66
- package/dist/src/components/joint-hirer/joint-hirer.repository.js.map +1 -1
- package/dist/src/components/rental/rental.d.ts +59 -59
- package/dist/src/components/rental/rental.js +603 -603
- package/dist/src/components/rental/rental.js.map +1 -1
- package/dist/src/components/rental/rental.repository.d.ts +8 -8
- package/dist/src/components/rental/rental.repository.js +66 -66
- package/dist/src/components/rental/rental.repository.js.map +1 -1
- package/dist/src/components/rental-price/rental-price.d.ts +18 -18
- package/dist/src/components/rental-price/rental-price.js +78 -78
- package/dist/src/components/rental-price/rental-price.js.map +1 -1
- package/dist/src/components/rental-price/rental-price.repository.d.ts +8 -8
- package/dist/src/components/rental-price/rental-price.repository.js +66 -66
- package/dist/src/components/rental-price/rental-price.repository.js.map +1 -1
- package/dist/src/database.d.ts +4 -4
- package/dist/src/database.js +24 -25
- package/dist/src/database.js.map +1 -1
- package/dist/src/enum/account-type.enum.d.ts +4 -4
- package/dist/src/enum/account-type.enum.js +8 -8
- package/dist/src/enum/account-type.enum.js.map +1 -1
- package/dist/src/enum/aggrement-status.enum.d.ts +5 -5
- package/dist/src/enum/aggrement-status.enum.js +9 -9
- package/dist/src/enum/aggrement-status.enum.js.map +1 -1
- package/dist/src/enum/booking.enum.d.ts +5 -5
- package/dist/src/enum/booking.enum.js +9 -9
- package/dist/src/enum/booking.enum.js.map +1 -1
- package/dist/src/enum/index.d.ts +5 -5
- package/dist/src/enum/index.js +11 -11
- package/dist/src/enum/rental-status.enum.d.ts +9 -9
- package/dist/src/enum/rental-status.enum.js +13 -13
- package/dist/src/enum/rental-status.enum.js.map +1 -1
- package/dist/src/index.d.ts +15 -15
- package/dist/src/index.js +42 -42
- package/dist/src/interfaces/agreement-attr.interface.d.ts +7 -7
- package/dist/src/interfaces/agreement-attr.interface.js +2 -2
- package/dist/src/interfaces/booking-attr.interface.d.ts +18 -18
- package/dist/src/interfaces/booking-attr.interface.js +2 -2
- package/dist/src/interfaces/booking-find-all-search-attr.interface.d.ts +12 -12
- package/dist/src/interfaces/booking-find-all-search-attr.interface.js +2 -2
- package/dist/src/interfaces/index.d.ts +7 -7
- package/dist/src/interfaces/index.js +2 -2
- package/dist/src/interfaces/joint-hirer-attr.interface.d.ts +10 -10
- package/dist/src/interfaces/joint-hirer-attr.interface.js +2 -2
- package/dist/src/interfaces/rental-attr.interface.d.ts +24 -24
- package/dist/src/interfaces/rental-attr.interface.js +2 -2
- package/dist/src/interfaces/rental-find-all-search-attr.interface.d.ts +10 -10
- package/dist/src/interfaces/rental-find-all-search-attr.interface.js +2 -2
- package/dist/src/interfaces/rental-price-attr.interface.d.ts +7 -7
- package/dist/src/interfaces/rental-price-attr.interface.js +2 -2
- package/dist/src/models/agreement.entity.d.ts +10 -10
- package/dist/src/models/agreement.entity.js +59 -59
- package/dist/src/models/agreement.entity.js.map +1 -1
- package/dist/src/models/booking.entity.d.ts +21 -21
- package/dist/src/models/booking.entity.js +127 -127
- package/dist/src/models/booking.entity.js.map +1 -1
- package/dist/src/models/index.d.ts +6 -6
- package/dist/src/models/index.js +13 -13
- package/dist/src/models/joint-hirer.entity.d.ts +13 -13
- package/dist/src/models/joint-hirer.entity.js +78 -78
- package/dist/src/models/joint-hirer.entity.js.map +1 -1
- package/dist/src/models/rental-price.entity.d.ts +8 -8
- package/dist/src/models/rental-price.entity.js +58 -58
- package/dist/src/models/rental-price.entity.js.map +1 -1
- package/dist/src/models/rental.entity.d.ts +29 -29
- package/dist/src/models/rental.entity.js +159 -159
- package/dist/src/models/rental.entity.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/eslint.config.mjs +37 -0
- package/migrations/booking-table-migration.js +1 -1
- package/migrations/joint-hirer-table-migration.js +1 -1
- package/migrations/rental-aggrement-table-migration.js +1 -1
- package/migrations/rental-price-table-migration.js +1 -1
- package/migrations/rental-table-migrations.js +1 -1
- package/package.json +33 -30
- package/src/components/booking/booking.ts +94 -1
- package/src/components/joint-hirer/joint-hirer.ts +1 -1
- package/src/components/rental/rental.ts +7 -10
- package/.eslintignore +0 -1
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { IRentalAttr } from '../../interfaces/rental-attr.interface';
|
|
2
|
-
import { RentalStatusEnum } from '../../enum/rental-status.enum';
|
|
3
|
-
import { RentalRepository } from './rental.repository';
|
|
4
|
-
import { ObjectBase } from '@tomei/general';
|
|
5
|
-
import { LoginUser } from '@tomei/sso';
|
|
6
|
-
import { RentalPrice } from '../rental-price/rental-price';
|
|
7
|
-
import { IRentalFindAllSearchAttr } from '../../interfaces/rental-find-all-search-attr.interface';
|
|
8
|
-
import { RentalAccountTypeEnum } from '../../enum/account-type.enum';
|
|
9
|
-
import { JointHirer } from '../joint-hirer/joint-hirer';
|
|
10
|
-
import { AgreementRepository } from '../agreement/agreement.repository';
|
|
11
|
-
import { JointHirerRepository } from '../joint-hirer/joint-hirer.repository';
|
|
12
|
-
export declare class Rental extends ObjectBase {
|
|
13
|
-
ObjectId: string;
|
|
14
|
-
ObjectName: string;
|
|
15
|
-
ObjectType: string;
|
|
16
|
-
TableName: string;
|
|
17
|
-
CustomerId: string;
|
|
18
|
-
CustomerType: string;
|
|
19
|
-
ItemId: string;
|
|
20
|
-
ItemType: string;
|
|
21
|
-
PriceId: string;
|
|
22
|
-
StartDateTime: Date;
|
|
23
|
-
EndDateTime: Date;
|
|
24
|
-
CancelRemarks: string;
|
|
25
|
-
TerminateRemarks: string;
|
|
26
|
-
AgreementNo: string;
|
|
27
|
-
AccountType: RentalAccountTypeEnum;
|
|
28
|
-
JointHirers: JointHirer[];
|
|
29
|
-
protected _Status: RentalStatusEnum;
|
|
30
|
-
protected _EscheatmentYN: string;
|
|
31
|
-
protected _CreatedById: string;
|
|
32
|
-
protected _CreatedAt: Date;
|
|
33
|
-
protected _UpdatedById: string;
|
|
34
|
-
protected _UpdatedAt: Date;
|
|
35
|
-
protected static _Repo: RentalRepository;
|
|
36
|
-
protected static _AgreementRepo: AgreementRepository;
|
|
37
|
-
protected static _JointHirerRepo: JointHirerRepository;
|
|
38
|
-
get RentalId(): string;
|
|
39
|
-
set RentalId(value: string);
|
|
40
|
-
get Status(): RentalStatusEnum;
|
|
41
|
-
get EscheatmentYN(): string;
|
|
42
|
-
get CreatedById(): string;
|
|
43
|
-
get CreatedAt(): Date;
|
|
44
|
-
get UpdatedById(): string;
|
|
45
|
-
get UpdatedAt(): Date;
|
|
46
|
-
private setTerminated;
|
|
47
|
-
protected constructor(rentalAttr?: IRentalAttr);
|
|
48
|
-
static init(dbTransaction?: any, rentalId?: string): Promise<Rental>;
|
|
49
|
-
create(rentalPrice: RentalPrice, loginUser: LoginUser, jointHirers?: JointHirer[], dbTransaction?: any): Promise<any>;
|
|
50
|
-
static isItemAvailable(itemId: string, itemType: string, startDateTime: Date, endDateTime: Date, dbTransaction?: any): Promise<boolean>;
|
|
51
|
-
static findAll(loginUser: LoginUser, dbTransaction: any, page?: number, row?: number, search?: IRentalFindAllSearchAttr): Promise<any>;
|
|
52
|
-
static checkActiveByItemId(loginUser: LoginUser, itemId: string, itemType: string, dbTransaction?: any): Promise<boolean>;
|
|
53
|
-
setStartDateTime(startDateTime: Date): void;
|
|
54
|
-
periodEndProcess(loginUser: LoginUser, dbTransaction: any, stockInventory: any): Promise<this>;
|
|
55
|
-
getCustomerActiveRentals(loginUser: LoginUser, dbTransaction: any, CustomerId: string): Promise<IRentalAttr[]>;
|
|
56
|
-
getCustomerIds(loginUser: LoginUser, dbTransaction: any): Promise<string[]>;
|
|
57
|
-
signAgreement(loginUser: LoginUser, dbTransaction: any): Promise<void>;
|
|
58
|
-
generateAgreement(loginUser: LoginUser, dbTransaction: any, MediaId: string): Promise<void>;
|
|
59
|
-
}
|
|
1
|
+
import { IRentalAttr } from '../../interfaces/rental-attr.interface';
|
|
2
|
+
import { RentalStatusEnum } from '../../enum/rental-status.enum';
|
|
3
|
+
import { RentalRepository } from './rental.repository';
|
|
4
|
+
import { ObjectBase } from '@tomei/general';
|
|
5
|
+
import { LoginUser } from '@tomei/sso';
|
|
6
|
+
import { RentalPrice } from '../rental-price/rental-price';
|
|
7
|
+
import { IRentalFindAllSearchAttr } from '../../interfaces/rental-find-all-search-attr.interface';
|
|
8
|
+
import { RentalAccountTypeEnum } from '../../enum/account-type.enum';
|
|
9
|
+
import { JointHirer } from '../joint-hirer/joint-hirer';
|
|
10
|
+
import { AgreementRepository } from '../agreement/agreement.repository';
|
|
11
|
+
import { JointHirerRepository } from '../joint-hirer/joint-hirer.repository';
|
|
12
|
+
export declare class Rental extends ObjectBase {
|
|
13
|
+
ObjectId: string;
|
|
14
|
+
ObjectName: string;
|
|
15
|
+
ObjectType: string;
|
|
16
|
+
TableName: string;
|
|
17
|
+
CustomerId: string;
|
|
18
|
+
CustomerType: string;
|
|
19
|
+
ItemId: string;
|
|
20
|
+
ItemType: string;
|
|
21
|
+
PriceId: string;
|
|
22
|
+
StartDateTime: Date;
|
|
23
|
+
EndDateTime: Date;
|
|
24
|
+
CancelRemarks: string;
|
|
25
|
+
TerminateRemarks: string;
|
|
26
|
+
AgreementNo: string;
|
|
27
|
+
AccountType: RentalAccountTypeEnum;
|
|
28
|
+
JointHirers: JointHirer[];
|
|
29
|
+
protected _Status: RentalStatusEnum;
|
|
30
|
+
protected _EscheatmentYN: string;
|
|
31
|
+
protected _CreatedById: string;
|
|
32
|
+
protected _CreatedAt: Date;
|
|
33
|
+
protected _UpdatedById: string;
|
|
34
|
+
protected _UpdatedAt: Date;
|
|
35
|
+
protected static _Repo: RentalRepository;
|
|
36
|
+
protected static _AgreementRepo: AgreementRepository;
|
|
37
|
+
protected static _JointHirerRepo: JointHirerRepository;
|
|
38
|
+
get RentalId(): string;
|
|
39
|
+
set RentalId(value: string);
|
|
40
|
+
get Status(): RentalStatusEnum;
|
|
41
|
+
get EscheatmentYN(): string;
|
|
42
|
+
get CreatedById(): string;
|
|
43
|
+
get CreatedAt(): Date;
|
|
44
|
+
get UpdatedById(): string;
|
|
45
|
+
get UpdatedAt(): Date;
|
|
46
|
+
private setTerminated;
|
|
47
|
+
protected constructor(rentalAttr?: IRentalAttr);
|
|
48
|
+
static init(dbTransaction?: any, rentalId?: string): Promise<Rental>;
|
|
49
|
+
create(rentalPrice: RentalPrice, loginUser: LoginUser, jointHirers?: JointHirer[], dbTransaction?: any): Promise<any>;
|
|
50
|
+
static isItemAvailable(itemId: string, itemType: string, startDateTime: Date, endDateTime: Date, dbTransaction?: any): Promise<boolean>;
|
|
51
|
+
static findAll(loginUser: LoginUser, dbTransaction: any, page?: number, row?: number, search?: IRentalFindAllSearchAttr): Promise<any>;
|
|
52
|
+
static checkActiveByItemId(loginUser: LoginUser, itemId: string, itemType: string, dbTransaction?: any): Promise<boolean>;
|
|
53
|
+
setStartDateTime(startDateTime: Date): void;
|
|
54
|
+
periodEndProcess(loginUser: LoginUser, dbTransaction: any, stockInventory: any): Promise<this>;
|
|
55
|
+
getCustomerActiveRentals(loginUser: LoginUser, dbTransaction: any, CustomerId: string): Promise<IRentalAttr[]>;
|
|
56
|
+
getCustomerIds(loginUser: LoginUser, dbTransaction: any): Promise<string[]>;
|
|
57
|
+
signAgreement(loginUser: LoginUser, dbTransaction: any): Promise<void>;
|
|
58
|
+
generateAgreement(loginUser: LoginUser, dbTransaction: any, MediaId: string): Promise<void>;
|
|
59
|
+
}
|