@tomei/rental 0.9.5 → 0.9.6

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 (50) hide show
  1. package/.commitlintrc.json +22 -22
  2. package/.eslintrc +16 -16
  3. package/.eslintrc.js +35 -35
  4. package/.gitlab-ci.yml +16 -16
  5. package/.husky/commit-msg +15 -15
  6. package/.husky/pre-commit +7 -7
  7. package/.prettierrc +4 -4
  8. package/Jenkinsfile +51 -51
  9. package/README.md +8 -8
  10. package/dist/src/components/rental/rental.js +15 -13
  11. package/dist/src/components/rental/rental.js.map +1 -1
  12. package/dist/tsconfig.tsbuildinfo +1 -1
  13. package/jest.config.js +10 -10
  14. package/migrations/booking-table-migration.js +79 -79
  15. package/migrations/joint-hirer-table-migration.js +52 -52
  16. package/migrations/rental-aggrement-table-migration.js +22 -22
  17. package/migrations/rental-price-table-migration.js +32 -32
  18. package/migrations/rental-table-migrations.js +96 -96
  19. package/package.json +75 -75
  20. package/sonar-project.properties +12 -12
  21. package/src/components/agreement/agreement.repository.ts +54 -54
  22. package/src/components/agreement/agreement.ts +43 -43
  23. package/src/components/booking/booking.repository.ts +51 -51
  24. package/src/components/booking/booking.ts +291 -291
  25. package/src/components/joint-hirer/joint-hirer.repository.ts +54 -54
  26. package/src/components/rental/rental.repository.ts +51 -51
  27. package/src/components/rental/rental.ts +722 -720
  28. package/src/components/rental-price/rental-price.repository.ts +54 -54
  29. package/src/components/rental-price/rental-price.ts +100 -100
  30. package/src/database.ts +27 -27
  31. package/src/enum/account-type.enum.ts +4 -4
  32. package/src/enum/booking.enum.ts +5 -5
  33. package/src/enum/index.ts +5 -5
  34. package/src/enum/rental-status.enum.ts +39 -39
  35. package/src/index.ts +28 -28
  36. package/src/interfaces/agreement-attr.interface.ts +4 -4
  37. package/src/interfaces/booking-attr.interface.ts +19 -19
  38. package/src/interfaces/index.ts +13 -13
  39. package/src/interfaces/joint-hirer-attr.interface.ts +10 -10
  40. package/src/interfaces/rental-attr.interface.ts +25 -25
  41. package/src/interfaces/rental-find-all-search-attr.interface.ts +11 -11
  42. package/src/interfaces/rental-price-attr.interface.ts +7 -7
  43. package/src/models/agreement.entity.ts +26 -26
  44. package/src/models/booking.entity.ts +105 -105
  45. package/src/models/index.ts +13 -13
  46. package/src/models/joint-hirer.entity.ts +63 -63
  47. package/src/models/rental-price.entity.ts +38 -38
  48. package/src/models/rental.entity.ts +133 -133
  49. package/tsconfig.build.json +5 -5
  50. package/tsconfig.json +23 -23
@@ -1,133 +1,133 @@
1
- import {
2
- Column,
3
- DataType,
4
- Table,
5
- Model,
6
- ForeignKey,
7
- BelongsTo,
8
- CreatedAt,
9
- UpdatedAt,
10
- HasMany,
11
- } from 'sequelize-typescript';
12
- import { RentalPriceModel } from './rental-price.entity';
13
- import { RentalStatusEnum } from '../enum/rental-status.enum';
14
- import { JointHirerModel } from './joint-hirer.entity';
15
- import { RentalAccountTypeEnum } from '../enum/account-type.enum';
16
- import { AgreementModel } from './agreement.entity';
17
-
18
- @Table({
19
- tableName: 'rental_Rental',
20
- })
21
- export class RentalModel extends Model {
22
- @Column({
23
- primaryKey: true,
24
- allowNull: false,
25
- type: DataType.STRING(30),
26
- })
27
- RentalId: string;
28
-
29
- @Column({
30
- allowNull: false,
31
- type: DataType.STRING(30),
32
- })
33
- CustomerId: string;
34
-
35
- @Column({
36
- allowNull: false,
37
- type: DataType.STRING(30),
38
- })
39
- CustomerType: string;
40
-
41
- @Column({
42
- allowNull: false,
43
- type: DataType.STRING(30),
44
- })
45
- ItemId: string;
46
-
47
- @Column({
48
- allowNull: false,
49
- type: DataType.STRING(30),
50
- })
51
- ItemType: string;
52
-
53
- @ForeignKey(() => RentalPriceModel)
54
- @Column({
55
- allowNull: false,
56
- type: DataType.STRING(30),
57
- })
58
- PriceId: string;
59
-
60
- @Column({
61
- allowNull: false,
62
- type: DataType.DATE,
63
- })
64
- StartDateTime: Date;
65
-
66
- @Column({
67
- allowNull: false,
68
- type: DataType.DATE,
69
- })
70
- EndDateTime: Date;
71
-
72
- @Column({
73
- allowNull: false,
74
- type: DataType.STRING(20),
75
- })
76
- Status: RentalStatusEnum;
77
-
78
- @Column({
79
- type: DataType.STRING(3000),
80
- })
81
- CancelRemarks: string;
82
-
83
- @Column({
84
- type: DataType.STRING(3000),
85
- })
86
- TerminateRemarks: string;
87
-
88
- @Column({
89
- type: DataType.CHAR(1),
90
- })
91
- EscheatmentYN: string;
92
-
93
- @ForeignKey(() => AgreementModel)
94
- @Column({
95
- allowNull: false,
96
- unique: true,
97
- type: DataType.STRING(30),
98
- })
99
- AgreementNo: string;
100
-
101
- @Column({
102
- allowNull: false,
103
- type: DataType.STRING(10),
104
- })
105
- AccountType: RentalAccountTypeEnum;
106
-
107
- @Column({
108
- allowNull: false,
109
- type: DataType.STRING(30),
110
- })
111
- CreatedById: string;
112
-
113
- @CreatedAt
114
- CreatedAt: Date;
115
-
116
- @Column({
117
- allowNull: false,
118
- type: DataType.STRING(30),
119
- })
120
- UpdatedById: string;
121
-
122
- @UpdatedAt
123
- UpdatedAt: Date;
124
-
125
- @BelongsTo(() => RentalPriceModel)
126
- RentalPrice: RentalPriceModel;
127
-
128
- @BelongsTo(() => AgreementModel)
129
- Agreement: AgreementModel;
130
-
131
- @HasMany(() => JointHirerModel)
132
- JointHirers: JointHirerModel[];
133
- }
1
+ import {
2
+ Column,
3
+ DataType,
4
+ Table,
5
+ Model,
6
+ ForeignKey,
7
+ BelongsTo,
8
+ CreatedAt,
9
+ UpdatedAt,
10
+ HasMany,
11
+ } from 'sequelize-typescript';
12
+ import { RentalPriceModel } from './rental-price.entity';
13
+ import { RentalStatusEnum } from '../enum/rental-status.enum';
14
+ import { JointHirerModel } from './joint-hirer.entity';
15
+ import { RentalAccountTypeEnum } from '../enum/account-type.enum';
16
+ import { AgreementModel } from './agreement.entity';
17
+
18
+ @Table({
19
+ tableName: 'rental_Rental',
20
+ })
21
+ export class RentalModel extends Model {
22
+ @Column({
23
+ primaryKey: true,
24
+ allowNull: false,
25
+ type: DataType.STRING(30),
26
+ })
27
+ RentalId: string;
28
+
29
+ @Column({
30
+ allowNull: false,
31
+ type: DataType.STRING(30),
32
+ })
33
+ CustomerId: string;
34
+
35
+ @Column({
36
+ allowNull: false,
37
+ type: DataType.STRING(30),
38
+ })
39
+ CustomerType: string;
40
+
41
+ @Column({
42
+ allowNull: false,
43
+ type: DataType.STRING(30),
44
+ })
45
+ ItemId: string;
46
+
47
+ @Column({
48
+ allowNull: false,
49
+ type: DataType.STRING(30),
50
+ })
51
+ ItemType: string;
52
+
53
+ @ForeignKey(() => RentalPriceModel)
54
+ @Column({
55
+ allowNull: false,
56
+ type: DataType.STRING(30),
57
+ })
58
+ PriceId: string;
59
+
60
+ @Column({
61
+ allowNull: false,
62
+ type: DataType.DATE,
63
+ })
64
+ StartDateTime: Date;
65
+
66
+ @Column({
67
+ allowNull: false,
68
+ type: DataType.DATE,
69
+ })
70
+ EndDateTime: Date;
71
+
72
+ @Column({
73
+ allowNull: false,
74
+ type: DataType.STRING(20),
75
+ })
76
+ Status: RentalStatusEnum;
77
+
78
+ @Column({
79
+ type: DataType.STRING(3000),
80
+ })
81
+ CancelRemarks: string;
82
+
83
+ @Column({
84
+ type: DataType.STRING(3000),
85
+ })
86
+ TerminateRemarks: string;
87
+
88
+ @Column({
89
+ type: DataType.CHAR(1),
90
+ })
91
+ EscheatmentYN: string;
92
+
93
+ @ForeignKey(() => AgreementModel)
94
+ @Column({
95
+ allowNull: false,
96
+ unique: true,
97
+ type: DataType.STRING(30),
98
+ })
99
+ AgreementNo: string;
100
+
101
+ @Column({
102
+ allowNull: false,
103
+ type: DataType.STRING(10),
104
+ })
105
+ AccountType: RentalAccountTypeEnum;
106
+
107
+ @Column({
108
+ allowNull: false,
109
+ type: DataType.STRING(30),
110
+ })
111
+ CreatedById: string;
112
+
113
+ @CreatedAt
114
+ CreatedAt: Date;
115
+
116
+ @Column({
117
+ allowNull: false,
118
+ type: DataType.STRING(30),
119
+ })
120
+ UpdatedById: string;
121
+
122
+ @UpdatedAt
123
+ UpdatedAt: Date;
124
+
125
+ @BelongsTo(() => RentalPriceModel)
126
+ RentalPrice: RentalPriceModel;
127
+
128
+ @BelongsTo(() => AgreementModel)
129
+ Agreement: AgreementModel;
130
+
131
+ @HasMany(() => JointHirerModel)
132
+ JointHirers: JointHirerModel[];
133
+ }
@@ -1,6 +1,6 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "include": ["**/*.ts"],
4
- "exclude": ["node_modules", "__tests__", "dist", "**/*spec.ts"]
5
- }
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "include": ["**/*.ts"],
4
+ "exclude": ["node_modules", "__tests__", "dist", "**/*spec.ts"]
5
+ }
6
6
 
package/tsconfig.json CHANGED
@@ -1,23 +1,23 @@
1
- {
2
- "compilerOptions": {
3
- "module": "commonjs",
4
- "declaration": true,
5
- "removeComments": true,
6
- "emitDecoratorMetadata": true,
7
- "experimentalDecorators": true,
8
- "allowSyntheticDefaultImports": true,
9
- "moduleResolution": "node",
10
- "target": "es6",
11
- "sourceMap": true,
12
- "outDir": "dist",
13
- "baseUrl": "./src",
14
- "rootDir": "./",
15
- "incremental": true,
16
- "skipLibCheck": true,
17
- "noImplicitAny": false,
18
- "strictBindCallApply": false,
19
- "forceConsistentCasingInFileNames": false,
20
- "noFallthroughCasesInSwitch": false,
21
- "strictNullChecks": false,
22
- },
23
- }
1
+ {
2
+ "compilerOptions": {
3
+ "module": "commonjs",
4
+ "declaration": true,
5
+ "removeComments": true,
6
+ "emitDecoratorMetadata": true,
7
+ "experimentalDecorators": true,
8
+ "allowSyntheticDefaultImports": true,
9
+ "moduleResolution": "node",
10
+ "target": "es6",
11
+ "sourceMap": true,
12
+ "outDir": "dist",
13
+ "baseUrl": "./src",
14
+ "rootDir": "./",
15
+ "incremental": true,
16
+ "skipLibCheck": true,
17
+ "noImplicitAny": false,
18
+ "strictBindCallApply": false,
19
+ "forceConsistentCasingInFileNames": false,
20
+ "noFallthroughCasesInSwitch": false,
21
+ "strictNullChecks": false,
22
+ },
23
+ }