@tomei/finance 0.6.74 → 0.6.76

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 (108) hide show
  1. package/.commitlintrc.json +22 -22
  2. package/.eslintrc.js +72 -72
  3. package/.gitlab-ci.yml +16 -16
  4. package/.husky/commit-msg +4 -4
  5. package/.husky/pre-commit +4 -4
  6. package/.prettierrc +4 -4
  7. package/CONTRIBUTING.md +30 -30
  8. package/LICENSE +21 -21
  9. package/README.md +13 -13
  10. package/configs/config.js +348 -348
  11. package/dist/document/document.d.ts +1 -1
  12. package/dist/document/document.js +0 -1
  13. package/dist/document/document.js.map +1 -1
  14. package/dist/finance-company/finance-company.js +8 -3
  15. package/dist/finance-company/finance-company.js.map +1 -1
  16. package/dist/payment-item/payment-item.js +4 -4
  17. package/dist/tsconfig.tsbuildinfo +1 -1
  18. package/invoice-template/assets/css/style.css.map +12 -12
  19. package/invoice-template/assets/css/style.min.css +1 -1
  20. package/invoice-template/assets/img/arrow_bg.svg +11 -11
  21. package/invoice-template/assets/img/coffy_shop_img.svg +18 -18
  22. package/invoice-template/assets/img/logo_accent.svg +3 -3
  23. package/invoice-template/assets/img/logo_white.svg +4 -4
  24. package/invoice-template/assets/img/sign.svg +12 -12
  25. package/invoice-template/assets/img/tomei-logo.svg +9 -9
  26. package/invoice-template/assets/js/html2canvas.min.js +10379 -10379
  27. package/invoice-template/assets/js/jquery.min.js +1 -1
  28. package/invoice-template/assets/sass/common/_color_variable.scss +12 -12
  29. package/invoice-template/assets/sass/common/_typography.scss +178 -178
  30. package/invoice-template/assets/sass/style.scss +12 -12
  31. package/migrations/finance-account-migration.js +97 -97
  32. package/migrations/finance-company-migration.js +29 -29
  33. package/migrations/finance-customer-migration.js +51 -51
  34. package/migrations/finance-document-item-migration.js +111 -111
  35. package/migrations/finance-document-migration.js +122 -122
  36. package/migrations/finance-journal-entry-migration.js +59 -59
  37. package/migrations/finance-ledger-transaction-migration.js +89 -89
  38. package/migrations/finance-payment-item-migration.js +52 -52
  39. package/migrations/finance-payment-method-migration.js +31 -31
  40. package/migrations/finance-payment-method-type-migration.js +55 -55
  41. package/migrations/finance-payment-migration.js +96 -96
  42. package/migrations/finance-post-history-migration.js +45 -45
  43. package/migrations/finance-tax-migration.js +52 -52
  44. package/migrations/refactor-finance-document-migration.js +71 -71
  45. package/nest-cli.json +19 -19
  46. package/package.json +82 -82
  47. package/sonar-project.properties +12 -12
  48. package/src/account/account.repository.ts +11 -11
  49. package/src/account/account.ts +276 -276
  50. package/src/account/interfaces/account-attr.interface.ts +31 -31
  51. package/src/account-system-entity/account-system-entity.ts +66 -66
  52. package/src/account-system-entity/post-history.repository.ts +11 -11
  53. package/src/config.ts +382 -382
  54. package/src/customer/customer.ts +299 -299
  55. package/src/customer/finance-customer.repository.ts +13 -13
  56. package/src/customer/interfaces/customer.repository.interface.ts +3 -3
  57. package/src/customer/interfaces/finance-customer-attr.interface.ts +10 -10
  58. package/src/customer/interfaces/finance-customer.repository.interface.ts +4 -4
  59. package/src/database.ts +48 -48
  60. package/src/document/document-item.repository.ts +11 -11
  61. package/src/document/document.repository.ts +11 -11
  62. package/src/document/document.ts +29 -22
  63. package/src/document/interfaces/document-attr.interface.ts +28 -28
  64. package/src/document/interfaces/document-item-attr.interface.ts +22 -22
  65. package/src/document/interfaces/document-item.repository.interface.ts +4 -4
  66. package/src/enum/collect-payment-type.ts +3 -3
  67. package/src/enum/doc-type.enum.ts +8 -8
  68. package/src/enum/index.ts +19 -19
  69. package/src/enum/payment-method.enum.ts +3 -3
  70. package/src/enum/payment-type.enum.ts +4 -4
  71. package/src/enum/quick-book-client-scopes.enum.ts +14 -14
  72. package/src/finance-company/finance-company.repository.ts +11 -11
  73. package/src/finance-company/finance-company.ts +2227 -2218
  74. package/src/helpers/login-user.ts +38 -38
  75. package/src/helpers/typeof.ts +35 -35
  76. package/src/index.ts +32 -32
  77. package/src/interfaces/account-system.interface.ts +20 -20
  78. package/src/interfaces/index.ts +3 -3
  79. package/src/models/account.entity.ts +206 -206
  80. package/src/models/customer.entity.ts +93 -93
  81. package/src/models/document-item.entity.ts +143 -143
  82. package/src/models/document.entity.ts +211 -211
  83. package/src/models/finance-company.entity.ts +29 -29
  84. package/src/models/journal-entry.entity.ts +110 -110
  85. package/src/models/ledger-transaction.entity.ts +148 -148
  86. package/src/models/payment-item.entity.ts +60 -60
  87. package/src/models/payment-method-type.entity.ts +70 -70
  88. package/src/models/payment-method.entity.ts +51 -51
  89. package/src/models/payment.entity.ts +165 -165
  90. package/src/models/post-history.entity.ts +41 -41
  91. package/src/models/tax.entity.ts +75 -75
  92. package/src/payment/interfaces/payment-attr.interface.ts +23 -23
  93. package/src/payment/interfaces/payment-params.interface.ts +8 -8
  94. package/src/payment/payment.repository.ts +11 -11
  95. package/src/payment/payment.ts +236 -236
  96. package/src/payment-item/interfaces/payment-item-attr.interface.ts +10 -10
  97. package/src/payment-item/payment-item.repository.ts +11 -11
  98. package/src/payment-item/payment-item.ts +134 -134
  99. package/src/payment-method/payment-method.repository.ts +11 -11
  100. package/src/payment-method-type/payment-method-type.repository.ts +11 -11
  101. package/src/tax/interfaces/tax-attr.interface.ts +10 -10
  102. package/src/tax/tax.repository.ts +11 -11
  103. package/src/tax/tax.ts +69 -69
  104. package/src/test-document.ts +25 -25
  105. package/src/test.ts +3 -3
  106. package/tsconfig.build.json +4 -4
  107. package/tsconfig.json +22 -22
  108. package/tslint.json +18 -18
@@ -1,70 +1,70 @@
1
- import { ApiProperty } from '@nestjs/swagger';
2
- import {
3
- BelongsTo,
4
- Column,
5
- DataType,
6
- Model,
7
- Table,
8
- ForeignKey,
9
- } from 'sequelize-typescript';
10
- import AccountModel from './account.entity';
11
- import PaymentMethodModel from './payment-method.entity';
12
-
13
- @Table({
14
- tableName: 'finance_PaymentMethodType',
15
- createdAt: false,
16
- updatedAt: false,
17
- })
18
- export default class PaymentMethodTypeModel extends Model {
19
- @ForeignKey(() => PaymentMethodModel)
20
- @ApiProperty({ example: 'cl6nzvo780000qcw38ihpd8w6' })
21
- @Column({
22
- allowNull: false,
23
- type: DataType.STRING(30),
24
- })
25
- MethodId: string;
26
-
27
- @ApiProperty({ example: 'cl6nzvo780000qcw38ihpd8w6' })
28
- @Column({
29
- primaryKey: true,
30
- allowNull: false,
31
- type: DataType.STRING(30),
32
- })
33
- MethodTypeId: string;
34
-
35
- @ApiProperty({ example: 'Cash' })
36
- @Column({
37
- allowNull: false,
38
- type: DataType.STRING(100),
39
- })
40
- Name: string;
41
-
42
- @ForeignKey(() => AccountModel)
43
- @ApiProperty({ example: 'cl6nzvo780000qcw38ihpd8w6' })
44
- @Column({
45
- allowNull: false,
46
- type: DataType.STRING(30),
47
- })
48
- AccountNo: string;
49
-
50
- @ApiProperty({ example: '100.0' })
51
- @Column({
52
- allowNull: false,
53
- type: DataType.DECIMAL(10, 2),
54
- })
55
- ProcessingFeeRate: number;
56
-
57
- @ForeignKey(() => AccountModel)
58
- @ApiProperty({ example: 'cl6nzvo780000qcw38ihpd8w6' })
59
- @Column({
60
- allowNull: false,
61
- type: DataType.STRING(30),
62
- })
63
- ProcessingFeeAccountNo: string;
64
-
65
- @BelongsTo(() => AccountModel)
66
- Account: AccountModel;
67
-
68
- @BelongsTo(() => PaymentMethodModel)
69
- PaymentMethod: PaymentMethodModel;
70
- }
1
+ import { ApiProperty } from '@nestjs/swagger';
2
+ import {
3
+ BelongsTo,
4
+ Column,
5
+ DataType,
6
+ Model,
7
+ Table,
8
+ ForeignKey,
9
+ } from 'sequelize-typescript';
10
+ import AccountModel from './account.entity';
11
+ import PaymentMethodModel from './payment-method.entity';
12
+
13
+ @Table({
14
+ tableName: 'finance_PaymentMethodType',
15
+ createdAt: false,
16
+ updatedAt: false,
17
+ })
18
+ export default class PaymentMethodTypeModel extends Model {
19
+ @ForeignKey(() => PaymentMethodModel)
20
+ @ApiProperty({ example: 'cl6nzvo780000qcw38ihpd8w6' })
21
+ @Column({
22
+ allowNull: false,
23
+ type: DataType.STRING(30),
24
+ })
25
+ MethodId: string;
26
+
27
+ @ApiProperty({ example: 'cl6nzvo780000qcw38ihpd8w6' })
28
+ @Column({
29
+ primaryKey: true,
30
+ allowNull: false,
31
+ type: DataType.STRING(30),
32
+ })
33
+ MethodTypeId: string;
34
+
35
+ @ApiProperty({ example: 'Cash' })
36
+ @Column({
37
+ allowNull: false,
38
+ type: DataType.STRING(100),
39
+ })
40
+ Name: string;
41
+
42
+ @ForeignKey(() => AccountModel)
43
+ @ApiProperty({ example: 'cl6nzvo780000qcw38ihpd8w6' })
44
+ @Column({
45
+ allowNull: false,
46
+ type: DataType.STRING(30),
47
+ })
48
+ AccountNo: string;
49
+
50
+ @ApiProperty({ example: '100.0' })
51
+ @Column({
52
+ allowNull: false,
53
+ type: DataType.DECIMAL(10, 2),
54
+ })
55
+ ProcessingFeeRate: number;
56
+
57
+ @ForeignKey(() => AccountModel)
58
+ @ApiProperty({ example: 'cl6nzvo780000qcw38ihpd8w6' })
59
+ @Column({
60
+ allowNull: false,
61
+ type: DataType.STRING(30),
62
+ })
63
+ ProcessingFeeAccountNo: string;
64
+
65
+ @BelongsTo(() => AccountModel)
66
+ Account: AccountModel;
67
+
68
+ @BelongsTo(() => PaymentMethodModel)
69
+ PaymentMethod: PaymentMethodModel;
70
+ }
@@ -1,51 +1,51 @@
1
- import { ApiProperty } from '@nestjs/swagger';
2
- import {
3
- ForeignKey,
4
- BelongsTo,
5
- Column,
6
- DataType,
7
- HasMany,
8
- Model,
9
- Table,
10
- } from 'sequelize-typescript';
11
- import PaymentMethodTypeModel from './payment-method-type.entity';
12
- import FinanceCompanyModel from './finance-company.entity';
13
-
14
- @Table({
15
- tableName: 'finance_PaymentMethod',
16
- createdAt: false,
17
- updatedAt: false,
18
- })
19
- export default class PaymentMethodModel extends Model {
20
- @ApiProperty({ example: 'cl6nzvo780000qcw38ihpd8w6' })
21
- @Column({
22
- primaryKey: true,
23
- allowNull: false,
24
- type: DataType.STRING(30),
25
- })
26
- MethodId: string;
27
-
28
- @ApiProperty({ example: 'cash' })
29
- @Column({
30
- allowNull: false,
31
- type: DataType.STRING(100),
32
- })
33
- Name: string;
34
-
35
- @ApiProperty({
36
- example: 'EZC',
37
- description: 'CompanyId',
38
- })
39
- @ForeignKey(() => FinanceCompanyModel)
40
- @Column({
41
- allowNull: false,
42
- type: DataType.STRING(30),
43
- })
44
- CompanyId: string;
45
-
46
- @HasMany(() => PaymentMethodTypeModel)
47
- PaymentMethodType: PaymentMethodTypeModel[];
48
-
49
- @BelongsTo(() => FinanceCompanyModel)
50
- FinanceCompany: FinanceCompanyModel;
51
- }
1
+ import { ApiProperty } from '@nestjs/swagger';
2
+ import {
3
+ ForeignKey,
4
+ BelongsTo,
5
+ Column,
6
+ DataType,
7
+ HasMany,
8
+ Model,
9
+ Table,
10
+ } from 'sequelize-typescript';
11
+ import PaymentMethodTypeModel from './payment-method-type.entity';
12
+ import FinanceCompanyModel from './finance-company.entity';
13
+
14
+ @Table({
15
+ tableName: 'finance_PaymentMethod',
16
+ createdAt: false,
17
+ updatedAt: false,
18
+ })
19
+ export default class PaymentMethodModel extends Model {
20
+ @ApiProperty({ example: 'cl6nzvo780000qcw38ihpd8w6' })
21
+ @Column({
22
+ primaryKey: true,
23
+ allowNull: false,
24
+ type: DataType.STRING(30),
25
+ })
26
+ MethodId: string;
27
+
28
+ @ApiProperty({ example: 'cash' })
29
+ @Column({
30
+ allowNull: false,
31
+ type: DataType.STRING(100),
32
+ })
33
+ Name: string;
34
+
35
+ @ApiProperty({
36
+ example: 'EZC',
37
+ description: 'CompanyId',
38
+ })
39
+ @ForeignKey(() => FinanceCompanyModel)
40
+ @Column({
41
+ allowNull: false,
42
+ type: DataType.STRING(30),
43
+ })
44
+ CompanyId: string;
45
+
46
+ @HasMany(() => PaymentMethodTypeModel)
47
+ PaymentMethodType: PaymentMethodTypeModel[];
48
+
49
+ @BelongsTo(() => FinanceCompanyModel)
50
+ FinanceCompany: FinanceCompanyModel;
51
+ }
@@ -1,165 +1,165 @@
1
- import { ApiProperty } from '@nestjs/swagger';
2
- import {
3
- Column,
4
- DataType,
5
- HasMany,
6
- Model,
7
- Table,
8
- UpdatedAt,
9
- BelongsTo,
10
- } from 'sequelize-typescript';
11
- import { ForeignKey } from 'sequelize-typescript/dist/associations/foreign-key/foreign-key';
12
- import { PaymentType, PaymentStatus } from '../enum';
13
- import DocumentModel from './document.entity';
14
- import PaymentItemModel from './payment-item.entity';
15
- import PaymentPaidWithModel from './payment-paid-with.entity';
16
-
17
- @Table({
18
- tableName: 'finance_Payment',
19
- timestamps: true,
20
- createdAt: false,
21
- })
22
- export default class PaymentModel extends Model {
23
- @Column({
24
- primaryKey: true,
25
- allowNull: false,
26
- type: DataType.STRING(30),
27
- })
28
- PaymentId: string;
29
-
30
- @Column({
31
- allowNull: false,
32
- type: DataType.ENUM('Payment Received', 'Payout'),
33
- })
34
- PaymentType: PaymentType;
35
-
36
- @Column({
37
- allowNull: false,
38
- type: DataType.DATE,
39
- })
40
- PaymentDate: Date;
41
-
42
- @Column({
43
- allowNull: false,
44
- type: DataType.STRING(1000),
45
- })
46
- Description: string;
47
-
48
- @Column({
49
- allowNull: false,
50
- type: DataType.CHAR(3),
51
- })
52
- Currency: string;
53
-
54
- @Column({
55
- allowNull: false,
56
- type: DataType.DECIMAL(10, 2),
57
- })
58
- Amount: number;
59
-
60
- @Column({
61
- allowNull: false,
62
- type: DataType.STRING(30),
63
- })
64
- Status: PaymentStatus;
65
-
66
- @Column({
67
- allowNull: true,
68
- type: DataType.STRING(30),
69
- })
70
- ReceivedBy: string;
71
-
72
- @Column({
73
- allowNull: true,
74
- type: DataType.STRING(30),
75
- })
76
- IssuedBy: string;
77
-
78
- @ApiProperty({
79
- example: new Date(),
80
- description: 'Timestamp for latest data modification',
81
- })
82
- @UpdatedAt
83
- UpdatedAt: Date;
84
-
85
- @Column({
86
- allowNull: false,
87
- type: DataType.STRING(30),
88
- })
89
- UpdatedBy: string;
90
-
91
- @Column({
92
- allowNull: true,
93
- type: DataType.TEXT,
94
- })
95
- Remarks: string;
96
-
97
- @Column({
98
- allowNull: true,
99
- type: DataType.STRING(30),
100
- })
101
- RelatedObjectId: string;
102
-
103
- @Column({
104
- allowNull: true,
105
- type: DataType.STRING(200),
106
- })
107
- RelatedObjectType: string;
108
-
109
- @ApiProperty({ type: String, description: 'DocNo' })
110
- @ForeignKey(() => DocumentModel)
111
- @Column({
112
- allowNull: true,
113
- type: DataType.STRING(30),
114
- })
115
- ReceiptDocNo: string;
116
-
117
- @ApiProperty({
118
- type: String,
119
- description: 'Account Customer Id in API',
120
- })
121
- @Column({
122
- allowNull: true,
123
- type: DataType.STRING(30),
124
- })
125
- AccSystemRefId: string;
126
-
127
- @ApiProperty({
128
- example: 'N',
129
- description: 'PostedToAccSystemYN',
130
- })
131
- @Column({
132
- allowNull: false,
133
- type: DataType.ENUM('Y', 'N'),
134
- })
135
- PostedToAccSystemYN: string;
136
-
137
- @ApiProperty({
138
- example: '138140891dd211b288',
139
- description: 'PostedById',
140
- })
141
- @Column({
142
- allowNull: true,
143
- type: DataType.STRING(30),
144
- })
145
- PostedById: string;
146
-
147
- @ApiProperty({
148
- example: new Date(),
149
- description: 'PostedToAccSystem Date',
150
- })
151
- @Column({
152
- allowNull: true,
153
- type: DataType.DATE,
154
- })
155
- PostedDateTime: Date;
156
-
157
- @HasMany(() => PaymentItemModel)
158
- PaymentItems: PaymentItemModel[];
159
-
160
- @HasMany(() => PaymentPaidWithModel)
161
- PaymentPaidWiths: PaymentPaidWithModel[];
162
-
163
- @BelongsTo(() => DocumentModel)
164
- Document: DocumentModel;
165
- }
1
+ import { ApiProperty } from '@nestjs/swagger';
2
+ import {
3
+ Column,
4
+ DataType,
5
+ HasMany,
6
+ Model,
7
+ Table,
8
+ UpdatedAt,
9
+ BelongsTo,
10
+ } from 'sequelize-typescript';
11
+ import { ForeignKey } from 'sequelize-typescript/dist/associations/foreign-key/foreign-key';
12
+ import { PaymentType, PaymentStatus } from '../enum';
13
+ import DocumentModel from './document.entity';
14
+ import PaymentItemModel from './payment-item.entity';
15
+ import PaymentPaidWithModel from './payment-paid-with.entity';
16
+
17
+ @Table({
18
+ tableName: 'finance_Payment',
19
+ timestamps: true,
20
+ createdAt: false,
21
+ })
22
+ export default class PaymentModel extends Model {
23
+ @Column({
24
+ primaryKey: true,
25
+ allowNull: false,
26
+ type: DataType.STRING(30),
27
+ })
28
+ PaymentId: string;
29
+
30
+ @Column({
31
+ allowNull: false,
32
+ type: DataType.ENUM('Payment Received', 'Payout'),
33
+ })
34
+ PaymentType: PaymentType;
35
+
36
+ @Column({
37
+ allowNull: false,
38
+ type: DataType.DATE,
39
+ })
40
+ PaymentDate: Date;
41
+
42
+ @Column({
43
+ allowNull: false,
44
+ type: DataType.STRING(1000),
45
+ })
46
+ Description: string;
47
+
48
+ @Column({
49
+ allowNull: false,
50
+ type: DataType.CHAR(3),
51
+ })
52
+ Currency: string;
53
+
54
+ @Column({
55
+ allowNull: false,
56
+ type: DataType.DECIMAL(10, 2),
57
+ })
58
+ Amount: number;
59
+
60
+ @Column({
61
+ allowNull: false,
62
+ type: DataType.STRING(30),
63
+ })
64
+ Status: PaymentStatus;
65
+
66
+ @Column({
67
+ allowNull: true,
68
+ type: DataType.STRING(30),
69
+ })
70
+ ReceivedBy: string;
71
+
72
+ @Column({
73
+ allowNull: true,
74
+ type: DataType.STRING(30),
75
+ })
76
+ IssuedBy: string;
77
+
78
+ @ApiProperty({
79
+ example: new Date(),
80
+ description: 'Timestamp for latest data modification',
81
+ })
82
+ @UpdatedAt
83
+ UpdatedAt: Date;
84
+
85
+ @Column({
86
+ allowNull: false,
87
+ type: DataType.STRING(30),
88
+ })
89
+ UpdatedBy: string;
90
+
91
+ @Column({
92
+ allowNull: true,
93
+ type: DataType.TEXT,
94
+ })
95
+ Remarks: string;
96
+
97
+ @Column({
98
+ allowNull: true,
99
+ type: DataType.STRING(30),
100
+ })
101
+ RelatedObjectId: string;
102
+
103
+ @Column({
104
+ allowNull: true,
105
+ type: DataType.STRING(200),
106
+ })
107
+ RelatedObjectType: string;
108
+
109
+ @ApiProperty({ type: String, description: 'DocNo' })
110
+ @ForeignKey(() => DocumentModel)
111
+ @Column({
112
+ allowNull: true,
113
+ type: DataType.STRING(30),
114
+ })
115
+ ReceiptDocNo: string;
116
+
117
+ @ApiProperty({
118
+ type: String,
119
+ description: 'Account Customer Id in API',
120
+ })
121
+ @Column({
122
+ allowNull: true,
123
+ type: DataType.STRING(30),
124
+ })
125
+ AccSystemRefId: string;
126
+
127
+ @ApiProperty({
128
+ example: 'N',
129
+ description: 'PostedToAccSystemYN',
130
+ })
131
+ @Column({
132
+ allowNull: false,
133
+ type: DataType.ENUM('Y', 'N'),
134
+ })
135
+ PostedToAccSystemYN: string;
136
+
137
+ @ApiProperty({
138
+ example: '138140891dd211b288',
139
+ description: 'PostedById',
140
+ })
141
+ @Column({
142
+ allowNull: true,
143
+ type: DataType.STRING(30),
144
+ })
145
+ PostedById: string;
146
+
147
+ @ApiProperty({
148
+ example: new Date(),
149
+ description: 'PostedToAccSystem Date',
150
+ })
151
+ @Column({
152
+ allowNull: true,
153
+ type: DataType.DATE,
154
+ })
155
+ PostedDateTime: Date;
156
+
157
+ @HasMany(() => PaymentItemModel)
158
+ PaymentItems: PaymentItemModel[];
159
+
160
+ @HasMany(() => PaymentPaidWithModel)
161
+ PaymentPaidWiths: PaymentPaidWithModel[];
162
+
163
+ @BelongsTo(() => DocumentModel)
164
+ Document: DocumentModel;
165
+ }
@@ -1,41 +1,41 @@
1
- import { ApiProperty } from '@nestjs/swagger';
2
- import { Column, DataType, Model, Table } from 'sequelize-typescript';
3
-
4
- @Table({ tableName: 'finance_PostHistory', createdAt: false, updatedAt: false })
5
- export default class FinancePostHistoryModel extends Model {
6
- @ApiProperty({ type: String, description: 'PostId' })
7
- @Column({
8
- primaryKey: true,
9
- allowNull: false,
10
- type: DataType.STRING(30),
11
- })
12
- PostId: string;
13
-
14
- @ApiProperty({ type: Date })
15
- @Column({ allowNull: false, type: DataType.DATE })
16
- DateTime: Date;
17
-
18
- @ApiProperty({ type: String, description: 'ItemId' })
19
- @Column({ allowNull: false, type: DataType.STRING(30) })
20
- ItemId: string;
21
-
22
- @ApiProperty({ type: String, description: 'ItemType' })
23
- @Column({ allowNull: false, type: DataType.STRING(200) })
24
- ItemType: string;
25
-
26
- @ApiProperty({ type: String, description: 'ItemValue' })
27
- @Column({ allowNull: false, type: DataType.JSON })
28
- ItemValue: string;
29
-
30
- @ApiProperty()
31
- @Column({ allowNull: false, type: DataType.STRING(30) })
32
- PostedById: string;
33
-
34
- @ApiProperty()
35
- @Column({ allowNull: false, type: DataType.STRING(10) })
36
- AccSystemCode: string;
37
-
38
- @ApiProperty()
39
- @Column({ allowNull: false, type: DataType.STRING(30) })
40
- AccSystemRefId: string;
41
- }
1
+ import { ApiProperty } from '@nestjs/swagger';
2
+ import { Column, DataType, Model, Table } from 'sequelize-typescript';
3
+
4
+ @Table({ tableName: 'finance_PostHistory', createdAt: false, updatedAt: false })
5
+ export default class FinancePostHistoryModel extends Model {
6
+ @ApiProperty({ type: String, description: 'PostId' })
7
+ @Column({
8
+ primaryKey: true,
9
+ allowNull: false,
10
+ type: DataType.STRING(30),
11
+ })
12
+ PostId: string;
13
+
14
+ @ApiProperty({ type: Date })
15
+ @Column({ allowNull: false, type: DataType.DATE })
16
+ DateTime: Date;
17
+
18
+ @ApiProperty({ type: String, description: 'ItemId' })
19
+ @Column({ allowNull: false, type: DataType.STRING(30) })
20
+ ItemId: string;
21
+
22
+ @ApiProperty({ type: String, description: 'ItemType' })
23
+ @Column({ allowNull: false, type: DataType.STRING(200) })
24
+ ItemType: string;
25
+
26
+ @ApiProperty({ type: String, description: 'ItemValue' })
27
+ @Column({ allowNull: false, type: DataType.JSON })
28
+ ItemValue: string;
29
+
30
+ @ApiProperty()
31
+ @Column({ allowNull: false, type: DataType.STRING(30) })
32
+ PostedById: string;
33
+
34
+ @ApiProperty()
35
+ @Column({ allowNull: false, type: DataType.STRING(10) })
36
+ AccSystemCode: string;
37
+
38
+ @ApiProperty()
39
+ @Column({ allowNull: false, type: DataType.STRING(30) })
40
+ AccSystemRefId: string;
41
+ }