@tomei/rental 0.8.5 → 0.9.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/.commitlintrc.json +22 -22
- package/.eslintrc +16 -16
- package/.eslintrc.js +35 -35
- package/.gitlab-ci.yml +16 -16
- package/.husky/commit-msg +15 -15
- package/.husky/pre-commit +7 -7
- package/.prettierrc +4 -4
- package/Jenkinsfile +51 -51
- package/README.md +8 -8
- package/dist/src/components/rental/rental.d.ts +1 -1
- package/dist/src/components/rental/rental.js +18 -18
- package/dist/src/components/rental/rental.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/jest.config.js +10 -10
- package/migrations/booking-table-migration.js +79 -79
- package/migrations/joint-hirer-table-migration.js +52 -52
- package/migrations/rental-aggrement-table-migration.js +22 -22
- package/migrations/rental-price-table-migration.js +32 -32
- package/migrations/rental-table-migrations.js +96 -96
- package/package.json +75 -75
- package/sonar-project.properties +12 -12
- package/src/components/agreement/agreement.repository.ts +54 -54
- package/src/components/agreement/agreement.ts +43 -43
- package/src/components/booking/booking.repository.ts +51 -51
- package/src/components/booking/booking.ts +291 -291
- package/src/components/joint-hirer/joint-hirer.repository.ts +54 -54
- package/src/components/rental/rental.repository.ts +51 -51
- package/src/components/rental/rental.ts +710 -710
- package/src/components/rental-price/rental-price.repository.ts +54 -54
- package/src/components/rental-price/rental-price.ts +100 -100
- package/src/database.ts +27 -27
- package/src/enum/account-type.enum.ts +4 -4
- package/src/enum/booking.enum.ts +5 -5
- package/src/enum/index.ts +5 -5
- package/src/enum/rental-status.enum.ts +39 -39
- package/src/index.ts +28 -28
- package/src/interfaces/agreement-attr.interface.ts +4 -4
- package/src/interfaces/booking-attr.interface.ts +19 -19
- package/src/interfaces/index.ts +13 -13
- package/src/interfaces/joint-hirer-attr.interface.ts +10 -10
- package/src/interfaces/rental-attr.interface.ts +25 -25
- package/src/interfaces/rental-find-all-search-attr.interface.ts +11 -11
- package/src/interfaces/rental-price-attr.interface.ts +7 -7
- package/src/models/agreement.entity.ts +26 -26
- package/src/models/booking.entity.ts +105 -105
- package/src/models/index.ts +13 -13
- package/src/models/joint-hirer.entity.ts +63 -63
- package/src/models/rental-price.entity.ts +38 -38
- package/src/models/rental.entity.ts +133 -133
- package/tsconfig.build.json +5 -5
- package/tsconfig.json +23 -23
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { RentalStatusEnum } from '../enum/rental-status.enum';
|
|
2
|
-
import { RentalAccountTypeEnum } from '../enum/account-type.enum';
|
|
3
|
-
import { IJointHirerAttr } from './joint-hirer-attr.interface';
|
|
4
|
-
|
|
5
|
-
export interface IRentalAttr {
|
|
6
|
-
RentalId: string;
|
|
7
|
-
CustomerId: string;
|
|
8
|
-
CustomerType: string;
|
|
9
|
-
ItemId: string;
|
|
10
|
-
ItemType: string;
|
|
11
|
-
PriceId: string;
|
|
12
|
-
StartDateTime: Date;
|
|
13
|
-
EndDateTime: Date;
|
|
14
|
-
CancelRemarks: string;
|
|
15
|
-
TerminateRemarks: string;
|
|
16
|
-
AgreementNo: string;
|
|
17
|
-
AccountType: RentalAccountTypeEnum;
|
|
18
|
-
Status: RentalStatusEnum;
|
|
19
|
-
EscheatmentYN: string;
|
|
20
|
-
CreatedById: string;
|
|
21
|
-
CreatedAt: Date;
|
|
22
|
-
UpdatedById: string;
|
|
23
|
-
UpdatedAt: Date;
|
|
24
|
-
JointHirers?: IJointHirerAttr[];
|
|
25
|
-
}
|
|
1
|
+
import { RentalStatusEnum } from '../enum/rental-status.enum';
|
|
2
|
+
import { RentalAccountTypeEnum } from '../enum/account-type.enum';
|
|
3
|
+
import { IJointHirerAttr } from './joint-hirer-attr.interface';
|
|
4
|
+
|
|
5
|
+
export interface IRentalAttr {
|
|
6
|
+
RentalId: string;
|
|
7
|
+
CustomerId: string;
|
|
8
|
+
CustomerType: string;
|
|
9
|
+
ItemId: string;
|
|
10
|
+
ItemType: string;
|
|
11
|
+
PriceId: string;
|
|
12
|
+
StartDateTime: Date;
|
|
13
|
+
EndDateTime: Date;
|
|
14
|
+
CancelRemarks: string;
|
|
15
|
+
TerminateRemarks: string;
|
|
16
|
+
AgreementNo: string;
|
|
17
|
+
AccountType: RentalAccountTypeEnum;
|
|
18
|
+
Status: RentalStatusEnum;
|
|
19
|
+
EscheatmentYN: string;
|
|
20
|
+
CreatedById: string;
|
|
21
|
+
CreatedAt: Date;
|
|
22
|
+
UpdatedById: string;
|
|
23
|
+
UpdatedAt: Date;
|
|
24
|
+
JointHirers?: IJointHirerAttr[];
|
|
25
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { RentalStatusEnum } from '../enum/rental-status.enum';
|
|
2
|
-
|
|
3
|
-
export interface IRentalFindAllSearchAttr {
|
|
4
|
-
Status?: RentalStatusEnum;
|
|
5
|
-
StartDateTime?: Date;
|
|
6
|
-
EndDateTime?: Date;
|
|
7
|
-
ItemId?: string;
|
|
8
|
-
ItemType?: string;
|
|
9
|
-
CustomerId?: string;
|
|
10
|
-
CustomerType?: string;
|
|
11
|
-
}
|
|
1
|
+
import { RentalStatusEnum } from '../enum/rental-status.enum';
|
|
2
|
+
|
|
3
|
+
export interface IRentalFindAllSearchAttr {
|
|
4
|
+
Status?: RentalStatusEnum;
|
|
5
|
+
StartDateTime?: Date;
|
|
6
|
+
EndDateTime?: Date;
|
|
7
|
+
ItemId?: string;
|
|
8
|
+
ItemType?: string;
|
|
9
|
+
CustomerId?: string;
|
|
10
|
+
CustomerType?: string;
|
|
11
|
+
}
|
|
@@ -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,26 +1,26 @@
|
|
|
1
|
-
import { Column, DataType, Table, Model, HasMany } from 'sequelize-typescript';
|
|
2
|
-
import { RentalModel } from './rental.entity';
|
|
3
|
-
|
|
4
|
-
@Table({
|
|
5
|
-
tableName: 'rental_Agreement',
|
|
6
|
-
createdAt: false,
|
|
7
|
-
updatedAt: false,
|
|
8
|
-
timestamps: false,
|
|
9
|
-
})
|
|
10
|
-
export class AgreementModel extends Model {
|
|
11
|
-
@Column({
|
|
12
|
-
primaryKey: true,
|
|
13
|
-
allowNull: false,
|
|
14
|
-
type: DataType.STRING(30),
|
|
15
|
-
})
|
|
16
|
-
AgreementNo: string;
|
|
17
|
-
|
|
18
|
-
@Column({
|
|
19
|
-
allowNull: false,
|
|
20
|
-
type: DataType.STRING(20),
|
|
21
|
-
})
|
|
22
|
-
Status: string;
|
|
23
|
-
|
|
24
|
-
@HasMany(() => RentalModel)
|
|
25
|
-
Rentals: RentalModel[];
|
|
26
|
-
}
|
|
1
|
+
import { Column, DataType, Table, Model, HasMany } from 'sequelize-typescript';
|
|
2
|
+
import { RentalModel } from './rental.entity';
|
|
3
|
+
|
|
4
|
+
@Table({
|
|
5
|
+
tableName: 'rental_Agreement',
|
|
6
|
+
createdAt: false,
|
|
7
|
+
updatedAt: false,
|
|
8
|
+
timestamps: false,
|
|
9
|
+
})
|
|
10
|
+
export class AgreementModel extends Model {
|
|
11
|
+
@Column({
|
|
12
|
+
primaryKey: true,
|
|
13
|
+
allowNull: false,
|
|
14
|
+
type: DataType.STRING(30),
|
|
15
|
+
})
|
|
16
|
+
AgreementNo: string;
|
|
17
|
+
|
|
18
|
+
@Column({
|
|
19
|
+
allowNull: false,
|
|
20
|
+
type: DataType.STRING(20),
|
|
21
|
+
})
|
|
22
|
+
Status: string;
|
|
23
|
+
|
|
24
|
+
@HasMany(() => RentalModel)
|
|
25
|
+
Rentals: RentalModel[];
|
|
26
|
+
}
|
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Column,
|
|
3
|
-
DataType,
|
|
4
|
-
Table,
|
|
5
|
-
Model,
|
|
6
|
-
ForeignKey,
|
|
7
|
-
BelongsTo,
|
|
8
|
-
CreatedAt,
|
|
9
|
-
UpdatedAt,
|
|
10
|
-
} from 'sequelize-typescript';
|
|
11
|
-
import { RentalPriceModel } from './rental-price.entity';
|
|
12
|
-
import { BookingStatusEnum } from '../enum/booking.enum';
|
|
13
|
-
|
|
14
|
-
@Table({
|
|
15
|
-
tableName: 'booking_Booking',
|
|
16
|
-
})
|
|
17
|
-
export class BookingModel extends Model {
|
|
18
|
-
@Column({
|
|
19
|
-
primaryKey: true,
|
|
20
|
-
allowNull: false,
|
|
21
|
-
type: DataType.STRING(30),
|
|
22
|
-
})
|
|
23
|
-
BookingNo: string;
|
|
24
|
-
|
|
25
|
-
@Column({
|
|
26
|
-
allowNull: false,
|
|
27
|
-
type: DataType.STRING(30),
|
|
28
|
-
})
|
|
29
|
-
CustomerId: string;
|
|
30
|
-
|
|
31
|
-
@Column({
|
|
32
|
-
allowNull: false,
|
|
33
|
-
type: DataType.STRING(30),
|
|
34
|
-
})
|
|
35
|
-
CustomerType: string;
|
|
36
|
-
|
|
37
|
-
@Column({
|
|
38
|
-
allowNull: false,
|
|
39
|
-
type: DataType.STRING(30),
|
|
40
|
-
})
|
|
41
|
-
ItemId: string;
|
|
42
|
-
|
|
43
|
-
@Column({
|
|
44
|
-
allowNull: false,
|
|
45
|
-
type: DataType.STRING(30),
|
|
46
|
-
})
|
|
47
|
-
ItemType: string;
|
|
48
|
-
|
|
49
|
-
@ForeignKey(() => RentalPriceModel)
|
|
50
|
-
@Column({
|
|
51
|
-
allowNull: false,
|
|
52
|
-
type: DataType.STRING(30),
|
|
53
|
-
})
|
|
54
|
-
PriceId: string;
|
|
55
|
-
|
|
56
|
-
@Column({
|
|
57
|
-
allowNull: false,
|
|
58
|
-
type: DataType.DATE,
|
|
59
|
-
})
|
|
60
|
-
ScheduledStartDateTime: Date;
|
|
61
|
-
|
|
62
|
-
@Column({
|
|
63
|
-
allowNull: false,
|
|
64
|
-
type: DataType.DATE,
|
|
65
|
-
})
|
|
66
|
-
ScheduledEndDateTime: Date;
|
|
67
|
-
|
|
68
|
-
@Column({
|
|
69
|
-
allowNull: true,
|
|
70
|
-
type: DataType.DECIMAL(10, 2),
|
|
71
|
-
})
|
|
72
|
-
BookingFee: number;
|
|
73
|
-
|
|
74
|
-
@Column({
|
|
75
|
-
allowNull: false,
|
|
76
|
-
type: DataType.STRING(20),
|
|
77
|
-
})
|
|
78
|
-
Status: BookingStatusEnum;
|
|
79
|
-
|
|
80
|
-
@Column({
|
|
81
|
-
type: DataType.STRING(3000),
|
|
82
|
-
})
|
|
83
|
-
CancelRemarks: string;
|
|
84
|
-
|
|
85
|
-
@Column({
|
|
86
|
-
allowNull: false,
|
|
87
|
-
type: DataType.STRING(30),
|
|
88
|
-
})
|
|
89
|
-
CreatedById: string;
|
|
90
|
-
|
|
91
|
-
@CreatedAt
|
|
92
|
-
CreatedAt: Date;
|
|
93
|
-
|
|
94
|
-
@Column({
|
|
95
|
-
allowNull: false,
|
|
96
|
-
type: DataType.STRING(30),
|
|
97
|
-
})
|
|
98
|
-
UpdatedById: string;
|
|
99
|
-
|
|
100
|
-
@UpdatedAt
|
|
101
|
-
UpdatedAt: Date;
|
|
102
|
-
|
|
103
|
-
@BelongsTo(() => RentalPriceModel)
|
|
104
|
-
RentalPrice: RentalPriceModel;
|
|
105
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
Column,
|
|
3
|
+
DataType,
|
|
4
|
+
Table,
|
|
5
|
+
Model,
|
|
6
|
+
ForeignKey,
|
|
7
|
+
BelongsTo,
|
|
8
|
+
CreatedAt,
|
|
9
|
+
UpdatedAt,
|
|
10
|
+
} from 'sequelize-typescript';
|
|
11
|
+
import { RentalPriceModel } from './rental-price.entity';
|
|
12
|
+
import { BookingStatusEnum } from '../enum/booking.enum';
|
|
13
|
+
|
|
14
|
+
@Table({
|
|
15
|
+
tableName: 'booking_Booking',
|
|
16
|
+
})
|
|
17
|
+
export class BookingModel extends Model {
|
|
18
|
+
@Column({
|
|
19
|
+
primaryKey: true,
|
|
20
|
+
allowNull: false,
|
|
21
|
+
type: DataType.STRING(30),
|
|
22
|
+
})
|
|
23
|
+
BookingNo: string;
|
|
24
|
+
|
|
25
|
+
@Column({
|
|
26
|
+
allowNull: false,
|
|
27
|
+
type: DataType.STRING(30),
|
|
28
|
+
})
|
|
29
|
+
CustomerId: string;
|
|
30
|
+
|
|
31
|
+
@Column({
|
|
32
|
+
allowNull: false,
|
|
33
|
+
type: DataType.STRING(30),
|
|
34
|
+
})
|
|
35
|
+
CustomerType: string;
|
|
36
|
+
|
|
37
|
+
@Column({
|
|
38
|
+
allowNull: false,
|
|
39
|
+
type: DataType.STRING(30),
|
|
40
|
+
})
|
|
41
|
+
ItemId: string;
|
|
42
|
+
|
|
43
|
+
@Column({
|
|
44
|
+
allowNull: false,
|
|
45
|
+
type: DataType.STRING(30),
|
|
46
|
+
})
|
|
47
|
+
ItemType: string;
|
|
48
|
+
|
|
49
|
+
@ForeignKey(() => RentalPriceModel)
|
|
50
|
+
@Column({
|
|
51
|
+
allowNull: false,
|
|
52
|
+
type: DataType.STRING(30),
|
|
53
|
+
})
|
|
54
|
+
PriceId: string;
|
|
55
|
+
|
|
56
|
+
@Column({
|
|
57
|
+
allowNull: false,
|
|
58
|
+
type: DataType.DATE,
|
|
59
|
+
})
|
|
60
|
+
ScheduledStartDateTime: Date;
|
|
61
|
+
|
|
62
|
+
@Column({
|
|
63
|
+
allowNull: false,
|
|
64
|
+
type: DataType.DATE,
|
|
65
|
+
})
|
|
66
|
+
ScheduledEndDateTime: Date;
|
|
67
|
+
|
|
68
|
+
@Column({
|
|
69
|
+
allowNull: true,
|
|
70
|
+
type: DataType.DECIMAL(10, 2),
|
|
71
|
+
})
|
|
72
|
+
BookingFee: number;
|
|
73
|
+
|
|
74
|
+
@Column({
|
|
75
|
+
allowNull: false,
|
|
76
|
+
type: DataType.STRING(20),
|
|
77
|
+
})
|
|
78
|
+
Status: BookingStatusEnum;
|
|
79
|
+
|
|
80
|
+
@Column({
|
|
81
|
+
type: DataType.STRING(3000),
|
|
82
|
+
})
|
|
83
|
+
CancelRemarks: string;
|
|
84
|
+
|
|
85
|
+
@Column({
|
|
86
|
+
allowNull: false,
|
|
87
|
+
type: DataType.STRING(30),
|
|
88
|
+
})
|
|
89
|
+
CreatedById: string;
|
|
90
|
+
|
|
91
|
+
@CreatedAt
|
|
92
|
+
CreatedAt: Date;
|
|
93
|
+
|
|
94
|
+
@Column({
|
|
95
|
+
allowNull: false,
|
|
96
|
+
type: DataType.STRING(30),
|
|
97
|
+
})
|
|
98
|
+
UpdatedById: string;
|
|
99
|
+
|
|
100
|
+
@UpdatedAt
|
|
101
|
+
UpdatedAt: Date;
|
|
102
|
+
|
|
103
|
+
@BelongsTo(() => RentalPriceModel)
|
|
104
|
+
RentalPrice: RentalPriceModel;
|
|
105
|
+
}
|
package/src/models/index.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { RentalModel } from './rental.entity';
|
|
2
|
-
import { RentalPriceModel } from './rental-price.entity';
|
|
3
|
-
import { BookingModel } from './booking.entity';
|
|
4
|
-
import { JointHirerModel } from './joint-hirer.entity';
|
|
5
|
-
import { AgreementModel } from './agreement.entity';
|
|
6
|
-
|
|
7
|
-
export {
|
|
8
|
-
RentalModel,
|
|
9
|
-
RentalPriceModel,
|
|
10
|
-
BookingModel,
|
|
11
|
-
JointHirerModel,
|
|
12
|
-
AgreementModel,
|
|
13
|
-
};
|
|
1
|
+
import { RentalModel } from './rental.entity';
|
|
2
|
+
import { RentalPriceModel } from './rental-price.entity';
|
|
3
|
+
import { BookingModel } from './booking.entity';
|
|
4
|
+
import { JointHirerModel } from './joint-hirer.entity';
|
|
5
|
+
import { AgreementModel } from './agreement.entity';
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
RentalModel,
|
|
9
|
+
RentalPriceModel,
|
|
10
|
+
BookingModel,
|
|
11
|
+
JointHirerModel,
|
|
12
|
+
AgreementModel,
|
|
13
|
+
};
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Column,
|
|
3
|
-
DataType,
|
|
4
|
-
Table,
|
|
5
|
-
Model,
|
|
6
|
-
ForeignKey,
|
|
7
|
-
BelongsTo,
|
|
8
|
-
CreatedAt,
|
|
9
|
-
UpdatedAt,
|
|
10
|
-
} from 'sequelize-typescript';
|
|
11
|
-
import { RentalModel } from './rental.entity';
|
|
12
|
-
|
|
13
|
-
@Table({
|
|
14
|
-
tableName: 'rental_JointHirer',
|
|
15
|
-
})
|
|
16
|
-
export class JointHirerModel extends Model {
|
|
17
|
-
@Column({
|
|
18
|
-
primaryKey: true,
|
|
19
|
-
allowNull: false,
|
|
20
|
-
type: DataType.STRING(30),
|
|
21
|
-
})
|
|
22
|
-
HirerId: string;
|
|
23
|
-
|
|
24
|
-
@ForeignKey(() => RentalModel)
|
|
25
|
-
@Column({
|
|
26
|
-
allowNull: false,
|
|
27
|
-
type: DataType.STRING(30),
|
|
28
|
-
})
|
|
29
|
-
RentalId: string;
|
|
30
|
-
|
|
31
|
-
@Column({
|
|
32
|
-
allowNull: false,
|
|
33
|
-
type: DataType.STRING(30),
|
|
34
|
-
})
|
|
35
|
-
CustomerId: string;
|
|
36
|
-
|
|
37
|
-
@Column({
|
|
38
|
-
allowNull: false,
|
|
39
|
-
type: DataType.STRING(30),
|
|
40
|
-
})
|
|
41
|
-
CustomerType: string;
|
|
42
|
-
|
|
43
|
-
@Column({
|
|
44
|
-
allowNull: false,
|
|
45
|
-
type: DataType.STRING(30),
|
|
46
|
-
})
|
|
47
|
-
CreatedById: string;
|
|
48
|
-
|
|
49
|
-
@CreatedAt
|
|
50
|
-
CreatedAt: Date;
|
|
51
|
-
|
|
52
|
-
@Column({
|
|
53
|
-
allowNull: false,
|
|
54
|
-
type: DataType.STRING(30),
|
|
55
|
-
})
|
|
56
|
-
UpdatedById: string;
|
|
57
|
-
|
|
58
|
-
@UpdatedAt
|
|
59
|
-
UpdatedAt: Date;
|
|
60
|
-
|
|
61
|
-
@BelongsTo(() => RentalModel)
|
|
62
|
-
RentalPrice: RentalModel;
|
|
63
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
Column,
|
|
3
|
+
DataType,
|
|
4
|
+
Table,
|
|
5
|
+
Model,
|
|
6
|
+
ForeignKey,
|
|
7
|
+
BelongsTo,
|
|
8
|
+
CreatedAt,
|
|
9
|
+
UpdatedAt,
|
|
10
|
+
} from 'sequelize-typescript';
|
|
11
|
+
import { RentalModel } from './rental.entity';
|
|
12
|
+
|
|
13
|
+
@Table({
|
|
14
|
+
tableName: 'rental_JointHirer',
|
|
15
|
+
})
|
|
16
|
+
export class JointHirerModel extends Model {
|
|
17
|
+
@Column({
|
|
18
|
+
primaryKey: true,
|
|
19
|
+
allowNull: false,
|
|
20
|
+
type: DataType.STRING(30),
|
|
21
|
+
})
|
|
22
|
+
HirerId: string;
|
|
23
|
+
|
|
24
|
+
@ForeignKey(() => RentalModel)
|
|
25
|
+
@Column({
|
|
26
|
+
allowNull: false,
|
|
27
|
+
type: DataType.STRING(30),
|
|
28
|
+
})
|
|
29
|
+
RentalId: string;
|
|
30
|
+
|
|
31
|
+
@Column({
|
|
32
|
+
allowNull: false,
|
|
33
|
+
type: DataType.STRING(30),
|
|
34
|
+
})
|
|
35
|
+
CustomerId: string;
|
|
36
|
+
|
|
37
|
+
@Column({
|
|
38
|
+
allowNull: false,
|
|
39
|
+
type: DataType.STRING(30),
|
|
40
|
+
})
|
|
41
|
+
CustomerType: string;
|
|
42
|
+
|
|
43
|
+
@Column({
|
|
44
|
+
allowNull: false,
|
|
45
|
+
type: DataType.STRING(30),
|
|
46
|
+
})
|
|
47
|
+
CreatedById: string;
|
|
48
|
+
|
|
49
|
+
@CreatedAt
|
|
50
|
+
CreatedAt: Date;
|
|
51
|
+
|
|
52
|
+
@Column({
|
|
53
|
+
allowNull: false,
|
|
54
|
+
type: DataType.STRING(30),
|
|
55
|
+
})
|
|
56
|
+
UpdatedById: string;
|
|
57
|
+
|
|
58
|
+
@UpdatedAt
|
|
59
|
+
UpdatedAt: Date;
|
|
60
|
+
|
|
61
|
+
@BelongsTo(() => RentalModel)
|
|
62
|
+
RentalPrice: RentalModel;
|
|
63
|
+
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { Column, DataType, Table, Model } from 'sequelize-typescript';
|
|
2
|
-
|
|
3
|
-
@Table({
|
|
4
|
-
tableName: 'rental_Price',
|
|
5
|
-
timestamps: false,
|
|
6
|
-
createdAt: false,
|
|
7
|
-
updatedAt: false,
|
|
8
|
-
})
|
|
9
|
-
export class RentalPriceModel extends Model {
|
|
10
|
-
@Column({
|
|
11
|
-
primaryKey: true,
|
|
12
|
-
allowNull: false,
|
|
13
|
-
type: DataType.STRING(30),
|
|
14
|
-
})
|
|
15
|
-
PriceId: string;
|
|
16
|
-
|
|
17
|
-
@Column({
|
|
18
|
-
allowNull: false,
|
|
19
|
-
type: DataType.DECIMAL(10, 2),
|
|
20
|
-
})
|
|
21
|
-
RetailPrice: number;
|
|
22
|
-
|
|
23
|
-
@Column({
|
|
24
|
-
allowNull: false,
|
|
25
|
-
type: DataType.CHAR(3),
|
|
26
|
-
})
|
|
27
|
-
Currency: string;
|
|
28
|
-
|
|
29
|
-
@Column({
|
|
30
|
-
type: DataType.STRING(10),
|
|
31
|
-
})
|
|
32
|
-
PromoCode: string;
|
|
33
|
-
|
|
34
|
-
@Column({
|
|
35
|
-
type: DataType.STRING(3000),
|
|
36
|
-
})
|
|
37
|
-
Remarks: string;
|
|
38
|
-
}
|
|
1
|
+
import { Column, DataType, Table, Model } from 'sequelize-typescript';
|
|
2
|
+
|
|
3
|
+
@Table({
|
|
4
|
+
tableName: 'rental_Price',
|
|
5
|
+
timestamps: false,
|
|
6
|
+
createdAt: false,
|
|
7
|
+
updatedAt: false,
|
|
8
|
+
})
|
|
9
|
+
export class RentalPriceModel extends Model {
|
|
10
|
+
@Column({
|
|
11
|
+
primaryKey: true,
|
|
12
|
+
allowNull: false,
|
|
13
|
+
type: DataType.STRING(30),
|
|
14
|
+
})
|
|
15
|
+
PriceId: string;
|
|
16
|
+
|
|
17
|
+
@Column({
|
|
18
|
+
allowNull: false,
|
|
19
|
+
type: DataType.DECIMAL(10, 2),
|
|
20
|
+
})
|
|
21
|
+
RetailPrice: number;
|
|
22
|
+
|
|
23
|
+
@Column({
|
|
24
|
+
allowNull: false,
|
|
25
|
+
type: DataType.CHAR(3),
|
|
26
|
+
})
|
|
27
|
+
Currency: string;
|
|
28
|
+
|
|
29
|
+
@Column({
|
|
30
|
+
type: DataType.STRING(10),
|
|
31
|
+
})
|
|
32
|
+
PromoCode: string;
|
|
33
|
+
|
|
34
|
+
@Column({
|
|
35
|
+
type: DataType.STRING(3000),
|
|
36
|
+
})
|
|
37
|
+
Remarks: string;
|
|
38
|
+
}
|