@mody-park-cha-raja/finance_common 1.0.3 → 1.0.4

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.mts CHANGED
@@ -17,12 +17,6 @@ interface IAuditColumnEntity {
17
17
  updatedBy: number;
18
18
  }
19
19
 
20
- interface IDonationEntity extends IAuditColumnEntity {
21
- id: number;
22
- flatNo: string;
23
- amount: number;
24
- }
25
-
26
20
  interface IBaseHistoryEntity extends IAuditColumnEntity {
27
21
  id: number;
28
22
  entityId: number;
@@ -33,6 +27,15 @@ interface IBaseHistoryEntity extends IAuditColumnEntity {
33
27
  interface IDonationHistoryEntity extends IBaseHistoryEntity {
34
28
  }
35
29
 
30
+ interface IDonationEntity extends IAuditColumnEntity {
31
+ id: number;
32
+ flatNo: string;
33
+ amount: number;
34
+ }
35
+
36
+ interface IExpenseHistoryEntity extends IBaseHistoryEntity {
37
+ }
38
+
36
39
  interface IExpenseEntity extends IAuditColumnEntity {
37
40
  id: number;
38
41
  name: string;
@@ -41,7 +44,7 @@ interface IExpenseEntity extends IAuditColumnEntity {
41
44
  amount: number;
42
45
  }
43
46
 
44
- interface IExpenseHistoryEntity extends IBaseHistoryEntity {
47
+ interface ISponsorHistoryEntity extends IBaseHistoryEntity {
45
48
  }
46
49
 
47
50
  interface ISponsorEntity extends IAuditColumnEntity {
@@ -53,7 +56,7 @@ interface ISponsorEntity extends IAuditColumnEntity {
53
56
  amount: number;
54
57
  }
55
58
 
56
- interface ISponsorHistoryEntity extends IBaseHistoryEntity {
59
+ interface ITransactionHistoryEntity extends IBaseHistoryEntity {
57
60
  }
58
61
 
59
62
  type TransactionType = 'Income' | 'Expense' | 'Sponsor';
@@ -67,7 +70,7 @@ interface ITransactionEntity extends IAuditColumnEntity {
67
70
  referenceId: string;
68
71
  }
69
72
 
70
- interface ITransactionHistoryEntity extends IBaseHistoryEntity {
73
+ interface IUserHistoryEntity extends IBaseHistoryEntity {
71
74
  }
72
75
 
73
76
  interface IUserEntity extends IAuditColumnEntity {
@@ -78,15 +81,15 @@ interface IUserEntity extends IAuditColumnEntity {
78
81
  phone: string;
79
82
  }
80
83
 
84
+ interface IVendorHistoryEntity extends IBaseHistoryEntity {
85
+ }
86
+
81
87
  interface IVendorEntity extends IAuditColumnEntity {
82
88
  id: number;
83
89
  name: string;
84
90
  type: string;
85
91
  }
86
92
 
87
- interface IVendorHistoryEntity extends IBaseHistoryEntity {
88
- }
89
-
90
93
  /**
91
94
  * Utility class for validating date codes in `YYYYMMDD` format.
92
95
  *
@@ -126,7 +129,24 @@ declare class DateUtil {
126
129
  static isFuture(epoch: number): boolean;
127
130
  }
128
131
 
129
- declare class DonationHistoryModel extends BaseEntityModel implements IDonationHistoryEntity {
132
+ declare abstract class BaseEntityModel {
133
+ static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList>>>;
134
+ populateRelations(searchResponse: ISearchV2Response, visited?: Set<string>): this;
135
+ }
136
+
137
+ declare class DonationModel extends BaseEntityModel implements IDonationEntity {
138
+ id: number;
139
+ flatNo: string;
140
+ amount: number;
141
+ createdOn: number;
142
+ updatedOn: number;
143
+ createdBy: number;
144
+ updatedBy: number;
145
+ protected constructor();
146
+ static populateFromEntity(entity: IDonationEntity): DonationModel;
147
+ }
148
+
149
+ declare class ExpenseHistoryModel extends BaseEntityModel implements IExpenseHistoryEntity {
130
150
  id: number;
131
151
  entityId: number;
132
152
  data: string;
@@ -136,8 +156,8 @@ declare class DonationHistoryModel extends BaseEntityModel implements IDonationH
136
156
  createdBy: number;
137
157
  updatedBy: number;
138
158
  protected constructor();
139
- static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.DONATION_HISTORY>>>;
140
- static populateFromEntity(entity: IDonationHistoryEntity): DonationHistoryModel;
159
+ static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.EXPENSE_HISTORY>>>;
160
+ static populateFromEntity(entity: IExpenseHistoryEntity): ExpenseHistoryModel;
141
161
  }
142
162
 
143
163
  declare class ExpenseModel extends BaseEntityModel implements IExpenseEntity {
@@ -154,7 +174,7 @@ declare class ExpenseModel extends BaseEntityModel implements IExpenseEntity {
154
174
  static populateFromEntity(entity: IExpenseEntity): ExpenseModel;
155
175
  }
156
176
 
157
- declare class ExpenseHistoryModel extends BaseEntityModel implements IExpenseHistoryEntity {
177
+ declare class SponsorHistoryModel extends BaseEntityModel implements ISponsorHistoryEntity {
158
178
  id: number;
159
179
  entityId: number;
160
180
  data: string;
@@ -164,8 +184,8 @@ declare class ExpenseHistoryModel extends BaseEntityModel implements IExpenseHis
164
184
  createdBy: number;
165
185
  updatedBy: number;
166
186
  protected constructor();
167
- static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.EXPENSE_HISTORY>>>;
168
- static populateFromEntity(entity: IExpenseHistoryEntity): ExpenseHistoryModel;
187
+ static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.SPONSOR_HISTORY>>>;
188
+ static populateFromEntity(entity: ISponsorHistoryEntity): SponsorHistoryModel;
169
189
  }
170
190
 
171
191
  declare class SponsorModel extends BaseEntityModel implements ISponsorEntity {
@@ -183,7 +203,7 @@ declare class SponsorModel extends BaseEntityModel implements ISponsorEntity {
183
203
  static populateFromEntity(entity: ISponsorEntity): SponsorModel;
184
204
  }
185
205
 
186
- declare class SponsorHistoryModel extends BaseEntityModel implements ISponsorHistoryEntity {
206
+ declare class TransactionHistoryModel extends BaseEntityModel implements ITransactionHistoryEntity {
187
207
  id: number;
188
208
  entityId: number;
189
209
  data: string;
@@ -193,8 +213,8 @@ declare class SponsorHistoryModel extends BaseEntityModel implements ISponsorHis
193
213
  createdBy: number;
194
214
  updatedBy: number;
195
215
  protected constructor();
196
- static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.SPONSOR_HISTORY>>>;
197
- static populateFromEntity(entity: ISponsorHistoryEntity): SponsorHistoryModel;
216
+ static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.TRANSACTION_HISTORY>>>;
217
+ static populateFromEntity(entity: ITransactionHistoryEntity): TransactionHistoryModel;
198
218
  }
199
219
 
200
220
  declare class TransactionModel extends BaseEntityModel implements ITransactionEntity {
@@ -213,7 +233,7 @@ declare class TransactionModel extends BaseEntityModel implements ITransactionEn
213
233
  static populateFromEntity(entity: ITransactionEntity): TransactionModel;
214
234
  }
215
235
 
216
- declare class TransactionHistoryModel extends BaseEntityModel implements ITransactionHistoryEntity {
236
+ declare class UserHistoryModel extends BaseEntityModel implements IUserHistoryEntity {
217
237
  id: number;
218
238
  entityId: number;
219
239
  data: string;
@@ -223,8 +243,8 @@ declare class TransactionHistoryModel extends BaseEntityModel implements ITransa
223
243
  createdBy: number;
224
244
  updatedBy: number;
225
245
  protected constructor();
226
- static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.TRANSACTION_HISTORY>>>;
227
- static populateFromEntity(entity: ITransactionHistoryEntity): TransactionHistoryModel;
246
+ static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.USER_HISTORY>>>;
247
+ static populateFromEntity(entity: IUserHistoryEntity): UserHistoryModel;
228
248
  }
229
249
 
230
250
  declare class UserModel extends BaseEntityModel implements IUserEntity {
@@ -241,36 +261,37 @@ declare class UserModel extends BaseEntityModel implements IUserEntity {
241
261
  static populateFromEntity(entity: IUserEntity): UserModel;
242
262
  }
243
263
 
244
- declare class VendorModel extends BaseEntityModel implements IVendorEntity {
264
+ declare class VendorHistoryModel extends BaseEntityModel implements IVendorHistoryEntity {
245
265
  id: number;
246
- name: string;
247
- type: string;
266
+ entityId: number;
267
+ data: string;
268
+ operation: EntityHistoryOperation;
248
269
  createdOn: number;
249
270
  updatedOn: number;
250
271
  createdBy: number;
251
272
  updatedBy: number;
252
273
  protected constructor();
253
- static populateFromEntity(entity: IVendorEntity): VendorModel;
274
+ static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.VENDOR_HISTORY>>>;
275
+ static populateFromEntity(entity: IVendorHistoryEntity): VendorHistoryModel;
254
276
  }
255
277
 
256
- declare class VendorHistoryModel extends BaseEntityModel implements IVendorHistoryEntity {
278
+ declare class VendorModel extends BaseEntityModel implements IVendorEntity {
257
279
  id: number;
258
- entityId: number;
259
- data: string;
260
- operation: EntityHistoryOperation;
280
+ name: string;
281
+ type: string;
261
282
  createdOn: number;
262
283
  updatedOn: number;
263
284
  createdBy: number;
264
285
  updatedBy: number;
265
286
  protected constructor();
266
- static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.VENDOR_HISTORY>>>;
267
- static populateFromEntity(entity: IVendorHistoryEntity): VendorHistoryModel;
287
+ static populateFromEntity(entity: IVendorEntity): VendorModel;
268
288
  }
269
289
 
270
290
  declare const entityListEntityModelMap: {
271
291
  donation: typeof DonationModel.populateFromEntity;
272
292
  donation_history: typeof DonationHistoryModel.populateFromEntity;
273
293
  user: typeof UserModel.populateFromEntity;
294
+ user_history: typeof UserHistoryModel.populateFromEntity;
274
295
  expense: typeof ExpenseModel.populateFromEntity;
275
296
  expense_history: typeof ExpenseHistoryModel.populateFromEntity;
276
297
  vendor: typeof VendorModel.populateFromEntity;
@@ -382,27 +403,25 @@ declare enum OrderByDirection {
382
403
  DESC = "DESC"
383
404
  }
384
405
 
385
- declare abstract class BaseEntityModel {
386
- static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList>>>;
387
- populateRelations(searchResponse: ISearchV2Response, visited?: Set<string>): this;
388
- }
389
-
390
- declare class DonationModel extends BaseEntityModel implements IDonationEntity {
406
+ declare class DonationHistoryModel extends BaseEntityModel implements IDonationHistoryEntity {
391
407
  id: number;
392
- flatNo: string;
393
- amount: number;
408
+ entityId: number;
409
+ data: string;
410
+ operation: EntityHistoryOperation;
394
411
  createdOn: number;
395
412
  updatedOn: number;
396
413
  createdBy: number;
397
414
  updatedBy: number;
398
415
  protected constructor();
399
- static populateFromEntity(entity: IDonationEntity): DonationModel;
416
+ static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.DONATION_HISTORY>>>;
417
+ static populateFromEntity(entity: IDonationHistoryEntity): DonationHistoryModel;
400
418
  }
401
419
 
402
420
  declare enum EntityList {
403
421
  DONATION = "donation",
404
422
  DONATION_HISTORY = "donation_history",
405
423
  USER = "user",
424
+ USER_HISTORY = "user_history",
406
425
  EXPENSE = "expense",
407
426
  EXPENSE_HISTORY = "expense_history",
408
427
  VENDOR = "vendor",
@@ -412,8 +431,8 @@ declare enum EntityList {
412
431
  SPONSOR = "sponsor",
413
432
  SPONSOR_HISTORY = "sponsor_history"
414
433
  }
415
- type EntityType<T extends EntityList> = T extends EntityList.DONATION ? IDonationEntity : T extends EntityList.DONATION_HISTORY ? IDonationHistoryEntity : T extends EntityList.USER ? IUserEntity : T extends EntityList.EXPENSE ? IExpenseEntity : T extends EntityList.EXPENSE_HISTORY ? IExpenseHistoryEntity : T extends EntityList.VENDOR ? IVendorEntity : T extends EntityList.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityList.TRANSACTION ? ITransactionEntity : T extends EntityList.TRANSACTION_HISTORY ? ITransactionHistoryEntity : T extends EntityList.SPONSOR ? ISponsorEntity : T extends EntityList.SPONSOR_HISTORY ? ISponsorHistoryEntity : never;
416
- type EntityModelType<T extends EntityList> = T extends EntityList.DONATION ? DonationModel : T extends EntityList.DONATION_HISTORY ? DonationHistoryModel : T extends EntityList.USER ? UserModel : T extends EntityList.EXPENSE ? ExpenseModel : T extends EntityList.EXPENSE_HISTORY ? ExpenseHistoryModel : T extends EntityList.VENDOR ? VendorModel : T extends EntityList.VENDOR_HISTORY ? VendorHistoryModel : T extends EntityList.TRANSACTION ? TransactionModel : T extends EntityList.TRANSACTION_HISTORY ? TransactionHistoryModel : T extends EntityList.SPONSOR ? SponsorModel : T extends EntityList.SPONSOR_HISTORY ? SponsorHistoryModel : never;
434
+ type EntityType<T extends EntityList> = T extends EntityList.DONATION ? IDonationEntity : T extends EntityList.DONATION_HISTORY ? IDonationHistoryEntity : T extends EntityList.USER ? IUserEntity : T extends EntityList.USER_HISTORY ? IUserHistoryEntity : T extends EntityList.EXPENSE ? IExpenseEntity : T extends EntityList.EXPENSE_HISTORY ? IExpenseHistoryEntity : T extends EntityList.VENDOR ? IVendorEntity : T extends EntityList.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityList.TRANSACTION ? ITransactionEntity : T extends EntityList.TRANSACTION_HISTORY ? ITransactionHistoryEntity : T extends EntityList.SPONSOR ? ISponsorEntity : T extends EntityList.SPONSOR_HISTORY ? ISponsorHistoryEntity : never;
435
+ type EntityModelType<T extends EntityList> = T extends EntityList.DONATION ? DonationModel : T extends EntityList.DONATION_HISTORY ? DonationHistoryModel : T extends EntityList.USER ? UserModel : T extends EntityList.USER_HISTORY ? UserHistoryModel : T extends EntityList.EXPENSE ? ExpenseModel : T extends EntityList.EXPENSE_HISTORY ? ExpenseHistoryModel : T extends EntityList.VENDOR ? VendorModel : T extends EntityList.VENDOR_HISTORY ? VendorHistoryModel : T extends EntityList.TRANSACTION ? TransactionModel : T extends EntityList.TRANSACTION_HISTORY ? TransactionHistoryModel : T extends EntityList.SPONSOR ? SponsorModel : T extends EntityList.SPONSOR_HISTORY ? SponsorHistoryModel : never;
417
436
  type EntityListEntityModelMap = {
418
437
  [T in EntityList]: EntityModelType<T>[];
419
438
  };
@@ -485,4 +504,4 @@ interface IDtoValidationError {
485
504
 
486
505
  type Nullable<T> = T | null;
487
506
 
488
- export { BadRequestException, BaseEntityModel, DateCodeUtils, DateUtil, DonationHistoryModel, DonationModel, EntityFilterDataHelper, EntityHistoryOperation, EntityList, type EntityListEntityModelMap, type EntityModelType, type EntityType, ExpenseHistoryModel, ExpenseModel, ForbiddenException, HttpException, type IAuditColumnEntity, type IBaseHistoryEntity, type IDonationEntity, type IDonationHistoryEntity, type IDtoValidationError, type IEntityCreateDto, type IEntityFilterData, type IEntityFilterSearchData, type IEntityFilterSearchDataV2, type IEntityUpdateDto, type IExpenseEntity, type IExpenseHistoryEntity, type IModelRelationConfig, type ISearchV2Response, type ISponsorEntity, type ISponsorHistoryEntity, type ITransactionEntity, type ITransactionHistoryEntity, type IUserEntity, type IVendorEntity, type IVendorHistoryEntity, NotFoundException, type Nullable, OrderByDirection, RelationType, SponsorFor, SponsorHistoryModel, SponsorModel, TransactionHistoryModel, TransactionModel, type TransactionType, UnauthorizedException, UserModel, VendorHistoryModel, VendorModel, definedValues, diffArrays, entityListEntityModelMap, getObjectDiffingKeys, groupBy };
507
+ export { BadRequestException, BaseEntityModel, DateCodeUtils, DateUtil, DonationHistoryModel, DonationModel, EntityFilterDataHelper, EntityHistoryOperation, EntityList, type EntityListEntityModelMap, type EntityModelType, type EntityType, ExpenseHistoryModel, ExpenseModel, ForbiddenException, HttpException, type IAuditColumnEntity, type IBaseHistoryEntity, type IDonationEntity, type IDonationHistoryEntity, type IDtoValidationError, type IEntityCreateDto, type IEntityFilterData, type IEntityFilterSearchData, type IEntityFilterSearchDataV2, type IEntityUpdateDto, type IExpenseEntity, type IExpenseHistoryEntity, type IModelRelationConfig, type ISearchV2Response, type ISponsorEntity, type ISponsorHistoryEntity, type ITransactionEntity, type ITransactionHistoryEntity, type IUserEntity, type IUserHistoryEntity, type IVendorEntity, type IVendorHistoryEntity, NotFoundException, type Nullable, OrderByDirection, RelationType, SponsorFor, SponsorHistoryModel, SponsorModel, TransactionHistoryModel, TransactionModel, type TransactionType, UnauthorizedException, UserHistoryModel, UserModel, VendorHistoryModel, VendorModel, definedValues, diffArrays, entityListEntityModelMap, getObjectDiffingKeys, groupBy };
package/dist/index.d.ts CHANGED
@@ -17,12 +17,6 @@ interface IAuditColumnEntity {
17
17
  updatedBy: number;
18
18
  }
19
19
 
20
- interface IDonationEntity extends IAuditColumnEntity {
21
- id: number;
22
- flatNo: string;
23
- amount: number;
24
- }
25
-
26
20
  interface IBaseHistoryEntity extends IAuditColumnEntity {
27
21
  id: number;
28
22
  entityId: number;
@@ -33,6 +27,15 @@ interface IBaseHistoryEntity extends IAuditColumnEntity {
33
27
  interface IDonationHistoryEntity extends IBaseHistoryEntity {
34
28
  }
35
29
 
30
+ interface IDonationEntity extends IAuditColumnEntity {
31
+ id: number;
32
+ flatNo: string;
33
+ amount: number;
34
+ }
35
+
36
+ interface IExpenseHistoryEntity extends IBaseHistoryEntity {
37
+ }
38
+
36
39
  interface IExpenseEntity extends IAuditColumnEntity {
37
40
  id: number;
38
41
  name: string;
@@ -41,7 +44,7 @@ interface IExpenseEntity extends IAuditColumnEntity {
41
44
  amount: number;
42
45
  }
43
46
 
44
- interface IExpenseHistoryEntity extends IBaseHistoryEntity {
47
+ interface ISponsorHistoryEntity extends IBaseHistoryEntity {
45
48
  }
46
49
 
47
50
  interface ISponsorEntity extends IAuditColumnEntity {
@@ -53,7 +56,7 @@ interface ISponsorEntity extends IAuditColumnEntity {
53
56
  amount: number;
54
57
  }
55
58
 
56
- interface ISponsorHistoryEntity extends IBaseHistoryEntity {
59
+ interface ITransactionHistoryEntity extends IBaseHistoryEntity {
57
60
  }
58
61
 
59
62
  type TransactionType = 'Income' | 'Expense' | 'Sponsor';
@@ -67,7 +70,7 @@ interface ITransactionEntity extends IAuditColumnEntity {
67
70
  referenceId: string;
68
71
  }
69
72
 
70
- interface ITransactionHistoryEntity extends IBaseHistoryEntity {
73
+ interface IUserHistoryEntity extends IBaseHistoryEntity {
71
74
  }
72
75
 
73
76
  interface IUserEntity extends IAuditColumnEntity {
@@ -78,15 +81,15 @@ interface IUserEntity extends IAuditColumnEntity {
78
81
  phone: string;
79
82
  }
80
83
 
84
+ interface IVendorHistoryEntity extends IBaseHistoryEntity {
85
+ }
86
+
81
87
  interface IVendorEntity extends IAuditColumnEntity {
82
88
  id: number;
83
89
  name: string;
84
90
  type: string;
85
91
  }
86
92
 
87
- interface IVendorHistoryEntity extends IBaseHistoryEntity {
88
- }
89
-
90
93
  /**
91
94
  * Utility class for validating date codes in `YYYYMMDD` format.
92
95
  *
@@ -126,7 +129,24 @@ declare class DateUtil {
126
129
  static isFuture(epoch: number): boolean;
127
130
  }
128
131
 
129
- declare class DonationHistoryModel extends BaseEntityModel implements IDonationHistoryEntity {
132
+ declare abstract class BaseEntityModel {
133
+ static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList>>>;
134
+ populateRelations(searchResponse: ISearchV2Response, visited?: Set<string>): this;
135
+ }
136
+
137
+ declare class DonationModel extends BaseEntityModel implements IDonationEntity {
138
+ id: number;
139
+ flatNo: string;
140
+ amount: number;
141
+ createdOn: number;
142
+ updatedOn: number;
143
+ createdBy: number;
144
+ updatedBy: number;
145
+ protected constructor();
146
+ static populateFromEntity(entity: IDonationEntity): DonationModel;
147
+ }
148
+
149
+ declare class ExpenseHistoryModel extends BaseEntityModel implements IExpenseHistoryEntity {
130
150
  id: number;
131
151
  entityId: number;
132
152
  data: string;
@@ -136,8 +156,8 @@ declare class DonationHistoryModel extends BaseEntityModel implements IDonationH
136
156
  createdBy: number;
137
157
  updatedBy: number;
138
158
  protected constructor();
139
- static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.DONATION_HISTORY>>>;
140
- static populateFromEntity(entity: IDonationHistoryEntity): DonationHistoryModel;
159
+ static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.EXPENSE_HISTORY>>>;
160
+ static populateFromEntity(entity: IExpenseHistoryEntity): ExpenseHistoryModel;
141
161
  }
142
162
 
143
163
  declare class ExpenseModel extends BaseEntityModel implements IExpenseEntity {
@@ -154,7 +174,7 @@ declare class ExpenseModel extends BaseEntityModel implements IExpenseEntity {
154
174
  static populateFromEntity(entity: IExpenseEntity): ExpenseModel;
155
175
  }
156
176
 
157
- declare class ExpenseHistoryModel extends BaseEntityModel implements IExpenseHistoryEntity {
177
+ declare class SponsorHistoryModel extends BaseEntityModel implements ISponsorHistoryEntity {
158
178
  id: number;
159
179
  entityId: number;
160
180
  data: string;
@@ -164,8 +184,8 @@ declare class ExpenseHistoryModel extends BaseEntityModel implements IExpenseHis
164
184
  createdBy: number;
165
185
  updatedBy: number;
166
186
  protected constructor();
167
- static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.EXPENSE_HISTORY>>>;
168
- static populateFromEntity(entity: IExpenseHistoryEntity): ExpenseHistoryModel;
187
+ static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.SPONSOR_HISTORY>>>;
188
+ static populateFromEntity(entity: ISponsorHistoryEntity): SponsorHistoryModel;
169
189
  }
170
190
 
171
191
  declare class SponsorModel extends BaseEntityModel implements ISponsorEntity {
@@ -183,7 +203,7 @@ declare class SponsorModel extends BaseEntityModel implements ISponsorEntity {
183
203
  static populateFromEntity(entity: ISponsorEntity): SponsorModel;
184
204
  }
185
205
 
186
- declare class SponsorHistoryModel extends BaseEntityModel implements ISponsorHistoryEntity {
206
+ declare class TransactionHistoryModel extends BaseEntityModel implements ITransactionHistoryEntity {
187
207
  id: number;
188
208
  entityId: number;
189
209
  data: string;
@@ -193,8 +213,8 @@ declare class SponsorHistoryModel extends BaseEntityModel implements ISponsorHis
193
213
  createdBy: number;
194
214
  updatedBy: number;
195
215
  protected constructor();
196
- static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.SPONSOR_HISTORY>>>;
197
- static populateFromEntity(entity: ISponsorHistoryEntity): SponsorHistoryModel;
216
+ static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.TRANSACTION_HISTORY>>>;
217
+ static populateFromEntity(entity: ITransactionHistoryEntity): TransactionHistoryModel;
198
218
  }
199
219
 
200
220
  declare class TransactionModel extends BaseEntityModel implements ITransactionEntity {
@@ -213,7 +233,7 @@ declare class TransactionModel extends BaseEntityModel implements ITransactionEn
213
233
  static populateFromEntity(entity: ITransactionEntity): TransactionModel;
214
234
  }
215
235
 
216
- declare class TransactionHistoryModel extends BaseEntityModel implements ITransactionHistoryEntity {
236
+ declare class UserHistoryModel extends BaseEntityModel implements IUserHistoryEntity {
217
237
  id: number;
218
238
  entityId: number;
219
239
  data: string;
@@ -223,8 +243,8 @@ declare class TransactionHistoryModel extends BaseEntityModel implements ITransa
223
243
  createdBy: number;
224
244
  updatedBy: number;
225
245
  protected constructor();
226
- static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.TRANSACTION_HISTORY>>>;
227
- static populateFromEntity(entity: ITransactionHistoryEntity): TransactionHistoryModel;
246
+ static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.USER_HISTORY>>>;
247
+ static populateFromEntity(entity: IUserHistoryEntity): UserHistoryModel;
228
248
  }
229
249
 
230
250
  declare class UserModel extends BaseEntityModel implements IUserEntity {
@@ -241,36 +261,37 @@ declare class UserModel extends BaseEntityModel implements IUserEntity {
241
261
  static populateFromEntity(entity: IUserEntity): UserModel;
242
262
  }
243
263
 
244
- declare class VendorModel extends BaseEntityModel implements IVendorEntity {
264
+ declare class VendorHistoryModel extends BaseEntityModel implements IVendorHistoryEntity {
245
265
  id: number;
246
- name: string;
247
- type: string;
266
+ entityId: number;
267
+ data: string;
268
+ operation: EntityHistoryOperation;
248
269
  createdOn: number;
249
270
  updatedOn: number;
250
271
  createdBy: number;
251
272
  updatedBy: number;
252
273
  protected constructor();
253
- static populateFromEntity(entity: IVendorEntity): VendorModel;
274
+ static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.VENDOR_HISTORY>>>;
275
+ static populateFromEntity(entity: IVendorHistoryEntity): VendorHistoryModel;
254
276
  }
255
277
 
256
- declare class VendorHistoryModel extends BaseEntityModel implements IVendorHistoryEntity {
278
+ declare class VendorModel extends BaseEntityModel implements IVendorEntity {
257
279
  id: number;
258
- entityId: number;
259
- data: string;
260
- operation: EntityHistoryOperation;
280
+ name: string;
281
+ type: string;
261
282
  createdOn: number;
262
283
  updatedOn: number;
263
284
  createdBy: number;
264
285
  updatedBy: number;
265
286
  protected constructor();
266
- static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.VENDOR_HISTORY>>>;
267
- static populateFromEntity(entity: IVendorHistoryEntity): VendorHistoryModel;
287
+ static populateFromEntity(entity: IVendorEntity): VendorModel;
268
288
  }
269
289
 
270
290
  declare const entityListEntityModelMap: {
271
291
  donation: typeof DonationModel.populateFromEntity;
272
292
  donation_history: typeof DonationHistoryModel.populateFromEntity;
273
293
  user: typeof UserModel.populateFromEntity;
294
+ user_history: typeof UserHistoryModel.populateFromEntity;
274
295
  expense: typeof ExpenseModel.populateFromEntity;
275
296
  expense_history: typeof ExpenseHistoryModel.populateFromEntity;
276
297
  vendor: typeof VendorModel.populateFromEntity;
@@ -382,27 +403,25 @@ declare enum OrderByDirection {
382
403
  DESC = "DESC"
383
404
  }
384
405
 
385
- declare abstract class BaseEntityModel {
386
- static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList>>>;
387
- populateRelations(searchResponse: ISearchV2Response, visited?: Set<string>): this;
388
- }
389
-
390
- declare class DonationModel extends BaseEntityModel implements IDonationEntity {
406
+ declare class DonationHistoryModel extends BaseEntityModel implements IDonationHistoryEntity {
391
407
  id: number;
392
- flatNo: string;
393
- amount: number;
408
+ entityId: number;
409
+ data: string;
410
+ operation: EntityHistoryOperation;
394
411
  createdOn: number;
395
412
  updatedOn: number;
396
413
  createdBy: number;
397
414
  updatedBy: number;
398
415
  protected constructor();
399
- static populateFromEntity(entity: IDonationEntity): DonationModel;
416
+ static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.DONATION_HISTORY>>>;
417
+ static populateFromEntity(entity: IDonationHistoryEntity): DonationHistoryModel;
400
418
  }
401
419
 
402
420
  declare enum EntityList {
403
421
  DONATION = "donation",
404
422
  DONATION_HISTORY = "donation_history",
405
423
  USER = "user",
424
+ USER_HISTORY = "user_history",
406
425
  EXPENSE = "expense",
407
426
  EXPENSE_HISTORY = "expense_history",
408
427
  VENDOR = "vendor",
@@ -412,8 +431,8 @@ declare enum EntityList {
412
431
  SPONSOR = "sponsor",
413
432
  SPONSOR_HISTORY = "sponsor_history"
414
433
  }
415
- type EntityType<T extends EntityList> = T extends EntityList.DONATION ? IDonationEntity : T extends EntityList.DONATION_HISTORY ? IDonationHistoryEntity : T extends EntityList.USER ? IUserEntity : T extends EntityList.EXPENSE ? IExpenseEntity : T extends EntityList.EXPENSE_HISTORY ? IExpenseHistoryEntity : T extends EntityList.VENDOR ? IVendorEntity : T extends EntityList.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityList.TRANSACTION ? ITransactionEntity : T extends EntityList.TRANSACTION_HISTORY ? ITransactionHistoryEntity : T extends EntityList.SPONSOR ? ISponsorEntity : T extends EntityList.SPONSOR_HISTORY ? ISponsorHistoryEntity : never;
416
- type EntityModelType<T extends EntityList> = T extends EntityList.DONATION ? DonationModel : T extends EntityList.DONATION_HISTORY ? DonationHistoryModel : T extends EntityList.USER ? UserModel : T extends EntityList.EXPENSE ? ExpenseModel : T extends EntityList.EXPENSE_HISTORY ? ExpenseHistoryModel : T extends EntityList.VENDOR ? VendorModel : T extends EntityList.VENDOR_HISTORY ? VendorHistoryModel : T extends EntityList.TRANSACTION ? TransactionModel : T extends EntityList.TRANSACTION_HISTORY ? TransactionHistoryModel : T extends EntityList.SPONSOR ? SponsorModel : T extends EntityList.SPONSOR_HISTORY ? SponsorHistoryModel : never;
434
+ type EntityType<T extends EntityList> = T extends EntityList.DONATION ? IDonationEntity : T extends EntityList.DONATION_HISTORY ? IDonationHistoryEntity : T extends EntityList.USER ? IUserEntity : T extends EntityList.USER_HISTORY ? IUserHistoryEntity : T extends EntityList.EXPENSE ? IExpenseEntity : T extends EntityList.EXPENSE_HISTORY ? IExpenseHistoryEntity : T extends EntityList.VENDOR ? IVendorEntity : T extends EntityList.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityList.TRANSACTION ? ITransactionEntity : T extends EntityList.TRANSACTION_HISTORY ? ITransactionHistoryEntity : T extends EntityList.SPONSOR ? ISponsorEntity : T extends EntityList.SPONSOR_HISTORY ? ISponsorHistoryEntity : never;
435
+ type EntityModelType<T extends EntityList> = T extends EntityList.DONATION ? DonationModel : T extends EntityList.DONATION_HISTORY ? DonationHistoryModel : T extends EntityList.USER ? UserModel : T extends EntityList.USER_HISTORY ? UserHistoryModel : T extends EntityList.EXPENSE ? ExpenseModel : T extends EntityList.EXPENSE_HISTORY ? ExpenseHistoryModel : T extends EntityList.VENDOR ? VendorModel : T extends EntityList.VENDOR_HISTORY ? VendorHistoryModel : T extends EntityList.TRANSACTION ? TransactionModel : T extends EntityList.TRANSACTION_HISTORY ? TransactionHistoryModel : T extends EntityList.SPONSOR ? SponsorModel : T extends EntityList.SPONSOR_HISTORY ? SponsorHistoryModel : never;
417
436
  type EntityListEntityModelMap = {
418
437
  [T in EntityList]: EntityModelType<T>[];
419
438
  };
@@ -485,4 +504,4 @@ interface IDtoValidationError {
485
504
 
486
505
  type Nullable<T> = T | null;
487
506
 
488
- export { BadRequestException, BaseEntityModel, DateCodeUtils, DateUtil, DonationHistoryModel, DonationModel, EntityFilterDataHelper, EntityHistoryOperation, EntityList, type EntityListEntityModelMap, type EntityModelType, type EntityType, ExpenseHistoryModel, ExpenseModel, ForbiddenException, HttpException, type IAuditColumnEntity, type IBaseHistoryEntity, type IDonationEntity, type IDonationHistoryEntity, type IDtoValidationError, type IEntityCreateDto, type IEntityFilterData, type IEntityFilterSearchData, type IEntityFilterSearchDataV2, type IEntityUpdateDto, type IExpenseEntity, type IExpenseHistoryEntity, type IModelRelationConfig, type ISearchV2Response, type ISponsorEntity, type ISponsorHistoryEntity, type ITransactionEntity, type ITransactionHistoryEntity, type IUserEntity, type IVendorEntity, type IVendorHistoryEntity, NotFoundException, type Nullable, OrderByDirection, RelationType, SponsorFor, SponsorHistoryModel, SponsorModel, TransactionHistoryModel, TransactionModel, type TransactionType, UnauthorizedException, UserModel, VendorHistoryModel, VendorModel, definedValues, diffArrays, entityListEntityModelMap, getObjectDiffingKeys, groupBy };
507
+ export { BadRequestException, BaseEntityModel, DateCodeUtils, DateUtil, DonationHistoryModel, DonationModel, EntityFilterDataHelper, EntityHistoryOperation, EntityList, type EntityListEntityModelMap, type EntityModelType, type EntityType, ExpenseHistoryModel, ExpenseModel, ForbiddenException, HttpException, type IAuditColumnEntity, type IBaseHistoryEntity, type IDonationEntity, type IDonationHistoryEntity, type IDtoValidationError, type IEntityCreateDto, type IEntityFilterData, type IEntityFilterSearchData, type IEntityFilterSearchDataV2, type IEntityUpdateDto, type IExpenseEntity, type IExpenseHistoryEntity, type IModelRelationConfig, type ISearchV2Response, type ISponsorEntity, type ISponsorHistoryEntity, type ITransactionEntity, type ITransactionHistoryEntity, type IUserEntity, type IUserHistoryEntity, type IVendorEntity, type IVendorHistoryEntity, NotFoundException, type Nullable, OrderByDirection, RelationType, SponsorFor, SponsorHistoryModel, SponsorModel, TransactionHistoryModel, TransactionModel, type TransactionType, UnauthorizedException, UserHistoryModel, UserModel, VendorHistoryModel, VendorModel, definedValues, diffArrays, entityListEntityModelMap, getObjectDiffingKeys, groupBy };