law-common 10.64.2-beta.0 → 10.64.2-beta.10

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 (42) hide show
  1. package/dist/src/api/interface/billing.create.dto.interface.d.ts +3 -1
  2. package/dist/src/api/interface/billing.update.dto.interface.d.ts +2 -1
  3. package/dist/src/entities/enums/billing_profile.enum.d.ts +4 -0
  4. package/dist/src/entities/enums/billing_profile.enum.js +8 -0
  5. package/dist/src/entities/index.d.ts +3 -0
  6. package/dist/src/entities/index.js +3 -0
  7. package/dist/src/entities/interface/billing_profile.entity.interface.d.ts +8 -0
  8. package/dist/src/entities/interface/billing_profile.entity.interface.js +2 -0
  9. package/dist/src/entities/interface/entity.utils.interface.d.ts +6 -3
  10. package/dist/src/entities/interface/entity.utils.interface.js +1 -0
  11. package/dist/src/entities/model/bank_history.entity.model.d.ts +4 -17
  12. package/dist/src/entities/model/bank_history.entity.model.js +3 -21
  13. package/dist/src/entities/model/base_history.entity.model.d.ts +17 -0
  14. package/dist/src/entities/model/base_history.entity.model.js +29 -0
  15. package/dist/src/entities/model/billing-profile.entity.model.d.ts +17 -0
  16. package/dist/src/entities/model/billing-profile.entity.model.js +27 -0
  17. package/dist/src/entities/model/billing-reimbursement-expense-history.entity.model.d.ts +4 -17
  18. package/dist/src/entities/model/billing-reimbursement-expense-history.entity.model.js +3 -21
  19. package/dist/src/entities/model/billing-transaction-history.entity.model.d.ts +4 -17
  20. package/dist/src/entities/model/billing-transaction-history.entity.model.js +3 -21
  21. package/dist/src/entities/model/billing.entity.model.d.ts +2 -0
  22. package/dist/src/entities/model/billing.entity.model.js +4 -0
  23. package/dist/src/entities/model/billing_history.entity.model.d.ts +4 -17
  24. package/dist/src/entities/model/billing_history.entity.model.js +3 -21
  25. package/dist/src/entities/model/billing_timesheet_history.entity.model.d.ts +4 -17
  26. package/dist/src/entities/model/billing_timesheet_history.entity.model.js +3 -21
  27. package/dist/src/entities/model/entity.model.interface.js +2 -0
  28. package/dist/src/entities/model/leave_history.entity.model.d.ts +4 -17
  29. package/dist/src/entities/model/leave_history.entity.model.js +3 -21
  30. package/dist/src/entities/model/reimbursement_history.entity.model.d.ts +4 -17
  31. package/dist/src/entities/model/reimbursement_history.entity.model.js +3 -21
  32. package/dist/src/entities/model/timesheet_history.entity.model.d.ts +4 -17
  33. package/dist/src/entities/model/timesheet_history.entity.model.js +3 -21
  34. package/dist/src/entities/model/vendor_history.entity.model.d.ts +4 -17
  35. package/dist/src/entities/model/vendor_history.entity.model.js +3 -21
  36. package/dist/src/entities/model/vendor_invoice_history.entity.model.d.ts +4 -17
  37. package/dist/src/entities/model/vendor_invoice_history.entity.model.js +3 -21
  38. package/dist/src/entities/model/vendor_invoice_item_history.entity.model.d.ts +4 -17
  39. package/dist/src/entities/model/vendor_invoice_item_history.entity.model.js +3 -21
  40. package/dist/src/entities/model/work_from_home_history.entity.model.d.ts +4 -17
  41. package/dist/src/entities/model/work_from_home_history.entity.model.js +3 -21
  42. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { BillingImpactEnum, BillingReimbursementExpenseChangedStatusEnum, BillingStatusEnum, IBillingEntity, IBillingTimesheetEntity, IEntityCreateDto, IProjectEntity, ITimesheetEntity, Nullable } from "../../entities";
1
+ import { BillingImpactEnum, BillingReimbursementExpenseChangedStatusEnum, BillingStatusEnum, IBillingEntity, IBillingProfileEntity, IBillingTimesheetEntity, IEntityCreateDto, IProjectEntity, ITimesheetEntity, Nullable } from "../../entities";
2
2
  import { IAppFileConfig } from "../../misc";
3
3
  export type IBillingCreateExclude = "paymentStatus" | "status" | "writeoffAmount" | "tdsAmount" | "totalAmountPaid" | "creditNoteAmount" | "refundAmount" | "invoicePdfUrl" | "startDate" | "endDate" | "invoiceNumber" | "draftInvoiceNumber";
4
4
  export interface IBillingCreateDto extends Omit<IEntityCreateDto<IBillingEntity>, IBillingCreateExclude | "particulars"> {
@@ -17,6 +17,7 @@ export interface IBillingParticulars {
17
17
  includePONumber: 0 | 1;
18
18
  includeGSTNumber: 0 | 1;
19
19
  poNumber: Nullable<string>;
20
+ name: string;
20
21
  }
21
22
  export interface IBillingCreateDtoExtra {
22
23
  particulars: IBillingParticulars[];
@@ -45,6 +46,7 @@ export interface IBillingEntityCreateDtoValidationData {
45
46
  projectEntity: IProjectEntity;
46
47
  billingTimesheetEntities: IBillingTimesheetEntity[];
47
48
  timesheetEntities: ITimesheetEntity[];
49
+ billingProfileEntity: IBillingProfileEntity;
48
50
  }
49
51
  export interface IBillingReimbursementExpenseCreateDtoDetails {
50
52
  userId: number;
@@ -1,4 +1,4 @@
1
- import { BillingActionsEnum, IBillingEntity, IBillingReimbursementExpenseUpdateDto, IBillingTimesheetUpdateDto, IEntityUpdateDto } from "../../entities";
1
+ import { BillingActionsEnum, IBillingEntity, IBillingProfileEntity, IBillingReimbursementExpenseUpdateDto, IBillingTimesheetUpdateDto, IEntityUpdateDto } from "../../entities";
2
2
  import { IBillingEntityCreateDtoValidationData, IBillingParticulars } from "./billing.create.dto.interface";
3
3
  export type IBillingUpdateDtoExclude = "draftInvoiceNumber" | "invoiceNumber";
4
4
  export interface IBillingUpdateDto extends Omit<IEntityUpdateDto<IBillingEntity>, IBillingUpdateDtoExclude> {
@@ -11,4 +11,5 @@ export interface IUpdateBillingDto extends Omit<IBillingUpdateDto, "particulars"
11
11
  }
12
12
  export interface IBillingUpdateDtoValidationData extends IBillingEntityCreateDtoValidationData {
13
13
  billingEntity: IBillingEntity;
14
+ billingProfileEntity: IBillingProfileEntity;
14
15
  }
@@ -0,0 +1,4 @@
1
+ export declare enum BillingProfileName {
2
+ AGRAM_LEGAL_CONSULTANTS = "AGRAM LEGAL CONSULTANTS",
3
+ AGRAM_LEGAL_PARTNERS = "AGRAM LEGAL PARTNERS"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BillingProfileName = void 0;
4
+ var BillingProfileName;
5
+ (function (BillingProfileName) {
6
+ BillingProfileName["AGRAM_LEGAL_CONSULTANTS"] = "AGRAM LEGAL CONSULTANTS";
7
+ BillingProfileName["AGRAM_LEGAL_PARTNERS"] = "AGRAM LEGAL PARTNERS";
8
+ })(BillingProfileName || (exports.BillingProfileName = BillingProfileName = {}));
@@ -179,3 +179,6 @@ export * from "./interface/client_quote.entity.interface";
179
179
  export * from "./interface/client_quote_rate.entity.interface";
180
180
  export * from "./model/client_quote.entity.model";
181
181
  export * from "./model/client_quote_rate.entity.model";
182
+ export * from "./enums/billing_profile.enum";
183
+ export * from "./interface/billing_profile.entity.interface";
184
+ export * from "./model/billing-profile.entity.model";
@@ -195,3 +195,6 @@ __exportStar(require("./interface/client_quote.entity.interface"), exports);
195
195
  __exportStar(require("./interface/client_quote_rate.entity.interface"), exports);
196
196
  __exportStar(require("./model/client_quote.entity.model"), exports);
197
197
  __exportStar(require("./model/client_quote_rate.entity.model"), exports);
198
+ __exportStar(require("./enums/billing_profile.enum"), exports);
199
+ __exportStar(require("./interface/billing_profile.entity.interface"), exports);
200
+ __exportStar(require("./model/billing-profile.entity.model"), exports);
@@ -0,0 +1,8 @@
1
+ import { BillingProfileName } from "../enums/billing_profile.enum";
2
+ import { IEntityAuditColumn } from "./entity-audit-columns.interface";
3
+ export interface IBillingProfileEntity extends IEntityAuditColumn {
4
+ id: number;
5
+ name: BillingProfileName;
6
+ logoFilePath: string;
7
+ pan: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,6 +7,7 @@ import { HistoryOperationEnum } from "../enums/history_operation.enum";
7
7
  import { AddressBookEntityModel } from "../model/address_book.model";
8
8
  import { BankEntityModel } from "../model/bank.entity.model";
9
9
  import { BankHistoryEntityModel } from "../model/bank_history.entity.model";
10
+ import { BillingProfileEntityModel } from "../model/billing-profile.entity.model";
10
11
  import { BillingReimbursementExpenseHistoryEntityModel } from "../model/billing-reimbursement-expense-history.entity.model";
11
12
  import { BillingReimbursementExpneseEntityModel } from "../model/billing-reimbursement-expense.entity.model";
12
13
  import { BillingTimesheetEntityModel } from "../model/billing-timesheet.entity.model";
@@ -78,6 +79,7 @@ import { IBillingTransactionHistoryEntity } from "./billing-transaction-history.
78
79
  import { IBillingEntity } from "./billing.entity.interface";
79
80
  import { IBillingHistoryEntity } from "./billing_history.entity.interface";
80
81
  import { IBillingPaymentEntity } from "./billing_payment.entity.interface";
82
+ import { IBillingProfileEntity } from "./billing_profile.entity.interface";
81
83
  import { IBillingTimesheetEntity } from "./billing_timesheet.entity.interface";
82
84
  import { IBillingTimesheetHistoryEntity } from "./billing_timesheet_history.entity.interface";
83
85
  import { IBillingTransactionEntity } from "./billing_transaction.entity.interface";
@@ -233,7 +235,8 @@ export declare enum EntityEnum {
233
235
  VENDOR_INVOICE_ITEM_HISTORY = "vendor_invoice_item_history",
234
236
  VENDOR_HISTORY = "vendor_history",
235
237
  CLIENT_QUOTE = "client_quote",
236
- CLIENT_QUOTE_RATE = "client_quote_rate"
238
+ CLIENT_QUOTE_RATE = "client_quote_rate",
239
+ BILLING_PROFILE = "billing_profile"
237
240
  }
238
241
  export type EntityRelations = {
239
242
  [K in EntityEnum | VirtualEntityEnum]: K;
@@ -252,7 +255,7 @@ export type IBaseEntityApiResponse<T> = {
252
255
  [K in EntityEnum | VirtualEntityEnum]?: IBaseEntityApiResponse<EnumEntityType<K>>;
253
256
  };
254
257
  };
255
- export type EnumEntityType<T extends EntityEnum | VirtualEntityEnum> = (T extends EntityEnum.BILLING ? IBillingEntity : T extends EntityEnum.BILLING_HISTORY ? IBillingHistoryEntity : T extends EntityEnum.BILLING_TIMESHEET ? IBillingTimesheetEntity : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? IBillingReimbursementExpenseEntity : T extends EntityEnum.BILLING_TIMESHEET_HISTORY ? IBillingTimesheetHistoryEntity : T extends EntityEnum.BILLING_REIMBURESMENT_EXPENSE_HISTORY ? IBillingReimbursementExpenseHistoryEntity : T extends EntityEnum.TIMESHEET ? ITimesheetEntity : T extends EntityEnum.USER ? IUserEntity : T extends EntityEnum.PROJECT ? IProjectEntity : T extends EntityEnum.CLIENT ? IClientEntity : T extends EntityEnum.LEAVE ? ILeaveEntity : T extends EntityEnum.BANK ? IBankEntity : T extends EntityEnum.BILLING_PAYMENT ? IBillingPaymentEntity : T extends EntityEnum.BILLING_TRANSACTION ? IBillingTransactionEntity : T extends EntityEnum.BILLING_TRANSACTION_HISTORY ? IBillingTransactionHistoryEntity : T extends EntityEnum.CLIENT_AFFILIATE ? IClientAffiliateEntity : T extends EntityEnum.CONFIGURATION ? IConfigurationEntity : T extends EntityEnum.HOLIDAY ? IHolidayEntity : T extends EntityEnum.HOLIDAY_LIST ? IHolidayListEntity : T extends EntityEnum.COUNTRY ? ICountryEntity : T extends EntityEnum.EXPENSE_TYPE ? IExpenseTypeEntity : T extends EntityEnum.INDUSTRY ? IIndustryEntity : T extends EntityEnum.INTERMEDIARY_BANK ? IIntermediaryBankEntity : T extends EntityEnum.OFFICE_LOCATION ? IOfficeLocationEntity : T extends EntityEnum.PERMISSION ? IPermissionEntity : T extends EntityEnum.ROLE ? IRoleEntity : T extends EntityEnum.TASK ? ITaskEntity : T extends EntityEnum.DESIGNATION ? IDesignationEntity : T extends EntityEnum.RATE ? IRateEntity : T extends EntityEnum.REIMBURSEMENT ? IReimbursementEntity : T extends EntityEnum.REIMBURSEMENT_EXPENSE ? IReimbursementExpenseEntity : T extends EntityEnum.REIMBURSEMENT_HISTORY ? IReimbursementHistoryEntity : T extends EntityEnum.WORK_FROM_HOME ? IWorkFromHomeEntity : T extends EntityEnum.ORGANIZATION ? IOrganizationEntity : T extends EntityEnum.PROJECT_USER_MAPPING ? IProjectUserMappingEntity : T extends EntityEnum.CLIENT_USER_MAPPING ? IClientUserMappingEntity : T extends EntityEnum.CLIENT_INTRODUCING_MAPPING ? IClientIntroducingMappingEntity : T extends EntityEnum.TO_DO_LIST ? IToDoListEntity : T extends EntityEnum.CRON_JOBS ? ICronJobsEntity : T extends EntityEnum.ROLE_PERMISSION_MAPPING ? IRolePermissionMappingEntity : T extends EntityEnum.BANK_HISTORY ? IBankHistoryEntity : T extends VirtualEntityEnum.LEAVE_COUNT ? ILeaveCountVirtualEntity : T extends EntityEnum.LEAVE_HISTORY ? ILeaveHistoryEntity : T extends EntityEnum.WORK_FROM_HOME_HISTORY ? IWorkFromHomeHistoryEntity : T extends EntityEnum.TIMESHEET_HISTORY ? ITimesheetHistoryEntity : T extends EntityEnum.ADDRESS_BOOK ? IAddressBookEntity : T extends EntityEnum.STATE ? IStateEntity : T extends EntityEnum.GST_RATE ? IGstRateEntity : T extends EntityEnum.ORGANIZATION_TYPE ? IOrganizationTypeEntity : T extends EntityEnum.TDS_RATE ? ITdsRateEntity : T extends EntityEnum.ORGANIZATION_TYPE_TDS_RATE_MAPPING ? IOrganizationTypeTdsRateMappingEntity : T extends EntityEnum.VOUCHER_TYPE ? IVoucherTypeEntity : T extends EntityEnum.TDS_RATE_VOUCHER_TYPE_MAPPING ? ITdsRateVoucherTypeMappingEntity : T extends EntityEnum.EXPENSE_HEAD ? IExpenseHeadEntity : T extends EntityEnum.DOCUMENT_UPLOAD ? IDocumentUploadEntity : T extends EntityEnum.VENDOR ? IVendorEntity : T extends EntityEnum.VENDOR_INVOICE ? IVendorInvoiceEntity : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? IVendorInvoiceHistoryEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM ? IVendorInvoiceItemEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? IVendorInvoiceItemHistoryEntity : T extends EntityEnum.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityEnum.WEBSITE_LEAD ? IWebsiteLeadEntity : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? IWebsiteNewsletterSubscriptionEntity : T extends EntityEnum.CLIENT_QUOTE ? IClientQuoteEntity : T extends EntityEnum.CLIENT_QUOTE_RATE ? IClientQuoteRateEntity : never) & {
258
+ export type EnumEntityType<T extends EntityEnum | VirtualEntityEnum> = (T extends EntityEnum.BILLING ? IBillingEntity : T extends EntityEnum.BILLING_HISTORY ? IBillingHistoryEntity : T extends EntityEnum.BILLING_TIMESHEET ? IBillingTimesheetEntity : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? IBillingReimbursementExpenseEntity : T extends EntityEnum.BILLING_TIMESHEET_HISTORY ? IBillingTimesheetHistoryEntity : T extends EntityEnum.BILLING_REIMBURESMENT_EXPENSE_HISTORY ? IBillingReimbursementExpenseHistoryEntity : T extends EntityEnum.TIMESHEET ? ITimesheetEntity : T extends EntityEnum.USER ? IUserEntity : T extends EntityEnum.PROJECT ? IProjectEntity : T extends EntityEnum.CLIENT ? IClientEntity : T extends EntityEnum.LEAVE ? ILeaveEntity : T extends EntityEnum.BANK ? IBankEntity : T extends EntityEnum.BILLING_PAYMENT ? IBillingPaymentEntity : T extends EntityEnum.BILLING_TRANSACTION ? IBillingTransactionEntity : T extends EntityEnum.BILLING_TRANSACTION_HISTORY ? IBillingTransactionHistoryEntity : T extends EntityEnum.CLIENT_AFFILIATE ? IClientAffiliateEntity : T extends EntityEnum.CONFIGURATION ? IConfigurationEntity : T extends EntityEnum.HOLIDAY ? IHolidayEntity : T extends EntityEnum.HOLIDAY_LIST ? IHolidayListEntity : T extends EntityEnum.COUNTRY ? ICountryEntity : T extends EntityEnum.EXPENSE_TYPE ? IExpenseTypeEntity : T extends EntityEnum.INDUSTRY ? IIndustryEntity : T extends EntityEnum.INTERMEDIARY_BANK ? IIntermediaryBankEntity : T extends EntityEnum.OFFICE_LOCATION ? IOfficeLocationEntity : T extends EntityEnum.PERMISSION ? IPermissionEntity : T extends EntityEnum.ROLE ? IRoleEntity : T extends EntityEnum.TASK ? ITaskEntity : T extends EntityEnum.DESIGNATION ? IDesignationEntity : T extends EntityEnum.RATE ? IRateEntity : T extends EntityEnum.REIMBURSEMENT ? IReimbursementEntity : T extends EntityEnum.REIMBURSEMENT_EXPENSE ? IReimbursementExpenseEntity : T extends EntityEnum.REIMBURSEMENT_HISTORY ? IReimbursementHistoryEntity : T extends EntityEnum.WORK_FROM_HOME ? IWorkFromHomeEntity : T extends EntityEnum.ORGANIZATION ? IOrganizationEntity : T extends EntityEnum.PROJECT_USER_MAPPING ? IProjectUserMappingEntity : T extends EntityEnum.CLIENT_USER_MAPPING ? IClientUserMappingEntity : T extends EntityEnum.CLIENT_INTRODUCING_MAPPING ? IClientIntroducingMappingEntity : T extends EntityEnum.TO_DO_LIST ? IToDoListEntity : T extends EntityEnum.CRON_JOBS ? ICronJobsEntity : T extends EntityEnum.ROLE_PERMISSION_MAPPING ? IRolePermissionMappingEntity : T extends EntityEnum.BANK_HISTORY ? IBankHistoryEntity : T extends VirtualEntityEnum.LEAVE_COUNT ? ILeaveCountVirtualEntity : T extends EntityEnum.LEAVE_HISTORY ? ILeaveHistoryEntity : T extends EntityEnum.WORK_FROM_HOME_HISTORY ? IWorkFromHomeHistoryEntity : T extends EntityEnum.TIMESHEET_HISTORY ? ITimesheetHistoryEntity : T extends EntityEnum.ADDRESS_BOOK ? IAddressBookEntity : T extends EntityEnum.STATE ? IStateEntity : T extends EntityEnum.GST_RATE ? IGstRateEntity : T extends EntityEnum.ORGANIZATION_TYPE ? IOrganizationTypeEntity : T extends EntityEnum.TDS_RATE ? ITdsRateEntity : T extends EntityEnum.ORGANIZATION_TYPE_TDS_RATE_MAPPING ? IOrganizationTypeTdsRateMappingEntity : T extends EntityEnum.VOUCHER_TYPE ? IVoucherTypeEntity : T extends EntityEnum.TDS_RATE_VOUCHER_TYPE_MAPPING ? ITdsRateVoucherTypeMappingEntity : T extends EntityEnum.EXPENSE_HEAD ? IExpenseHeadEntity : T extends EntityEnum.DOCUMENT_UPLOAD ? IDocumentUploadEntity : T extends EntityEnum.VENDOR ? IVendorEntity : T extends EntityEnum.VENDOR_INVOICE ? IVendorInvoiceEntity : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? IVendorInvoiceHistoryEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM ? IVendorInvoiceItemEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? IVendorInvoiceItemHistoryEntity : T extends EntityEnum.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityEnum.WEBSITE_LEAD ? IWebsiteLeadEntity : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? IWebsiteNewsletterSubscriptionEntity : T extends EntityEnum.CLIENT_QUOTE ? IClientQuoteEntity : T extends EntityEnum.CLIENT_QUOTE_RATE ? IClientQuoteRateEntity : T extends EntityEnum.BILLING_PROFILE ? IBillingProfileEntity : never) & {
256
259
  id: number;
257
260
  };
258
261
  export type EntityRelationConfig<T extends EntityEnum | VirtualEntityEnum> = {
@@ -376,7 +379,7 @@ export declare enum VirtualEntityEnum {
376
379
  }
377
380
  export type IHistoryConstraintSearchResponse<T> = IBaseResponse<IHistoryEntitySearchByConstraintResponse<T>[]>;
378
381
  export type IHistoryConstraintSearchServiceResponse<T> = IHistoryEntitySearchByConstraintResponse<T>[];
379
- export type EnumToModel<T extends EntityEnum | VirtualEntityEnum> = T extends EntityEnum.BILLING ? BillingEntityModel : T extends EntityEnum.BILLING_HISTORY ? BillingHistoryEntityModel : T extends EntityEnum.CLIENT ? ClientEntityModel : T extends EntityEnum.INTERMEDIARY_BANK ? IntermediaryBankEntityModel : T extends EntityEnum.PROJECT ? ProjectEntityModel : T extends EntityEnum.PROJECT_USER_MAPPING ? ProjectUserMappingEntityModel : T extends EntityEnum.REIMBURSEMENT ? ReimbursementEntityModel : T extends EntityEnum.REIMBURSEMENT_EXPENSE ? ReimbursementExpenseEntityModel : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? BillingReimbursementExpneseEntityModel : T extends EntityEnum.BILLING_REIMBURESMENT_EXPENSE_HISTORY ? BillingReimbursementExpenseHistoryEntityModel : T extends EntityEnum.LEAVE ? LeaveEntityModel : T extends EntityEnum.WORK_FROM_HOME ? WorkFromHomeEntityModel : T extends EntityEnum.HOLIDAY ? HolidayEntityModel : T extends VirtualEntityEnum.LEAVE_COUNT ? LeaveCountVirtualEntityModel : T extends EntityEnum.CLIENT_AFFILIATE ? ClientAffiliateEntityModel : T extends EntityEnum.BANK ? BankEntityModel : T extends EntityEnum.CONFIGURATION ? ConfigurationEntityModel : T extends EntityEnum.TASK ? TaskEntityModel : T extends EntityEnum.BILLING_TIMESHEET ? BillingTimesheetEntityModel : T extends EntityEnum.BILLING_TIMESHEET_HISTORY ? BillingTimesheetHistoryEntityModel : T extends EntityEnum.TIMESHEET ? TimesheetEntityModel : T extends EntityEnum.TIMESHEET_HISTORY ? TimesheetHistoryEntityModel : T extends EntityEnum.COUNTRY ? CountryEntityModel : T extends EntityEnum.BILLING_TRANSACTION ? BillingTransactionEntityModel : T extends EntityEnum.BILLING_TRANSACTION_HISTORY ? BillingTransactionHistoryEntityModel : T extends EntityEnum.ADDRESS_BOOK ? AddressBookEntityModel : T extends EntityEnum.STATE ? StateEntityModel : T extends EntityEnum.GST_RATE ? GstRateEntityModel : T extends EntityEnum.ORGANIZATION_TYPE ? OrganizationTypeEntityModel : T extends EntityEnum.TDS_RATE ? TdsRateEntityModel : T extends EntityEnum.ORGANIZATION_TYPE_TDS_RATE_MAPPING ? OrganizationTypeTdsRateMappingEntityModel : T extends EntityEnum.VOUCHER_TYPE ? VoucherTypeEntityModel : T extends EntityEnum.TDS_RATE_VOUCHER_TYPE_MAPPING ? TdsRateVoucherTypeMappingEntityModel : T extends EntityEnum.ORGANIZATION ? OrganizationEntityModel : T extends EntityEnum.INDUSTRY ? IndustryEntityModel : T extends EntityEnum.EXPENSE_TYPE ? ExpenseTypeEntityModel : T extends EntityEnum.DESIGNATION ? DesignationEntityModel : T extends EntityEnum.RATE ? RateEntityModel : T extends EntityEnum.ROLE ? RoleEntityModel : T extends EntityEnum.ROLE_PERMISSION_MAPPING ? RolePermissionMappingEntityModel : T extends EntityEnum.PERMISSION ? PermissionEntityModel : T extends EntityEnum.EXPENSE_HEAD ? ExpenseHeadEntityModel : T extends EntityEnum.DOCUMENT_UPLOAD ? DocumentUploadEntityModel : T extends EntityEnum.VENDOR ? VendorEntityModel : T extends EntityEnum.VENDOR_INVOICE ? VendorInvoiceEntityModel : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? VendorInvoiceHistoryEntityModel : T extends EntityEnum.OFFICE_LOCATION ? OfficeLocationEntityModel : T extends EntityEnum.VENDOR_INVOICE_ITEM ? VendorInvoiceItemEntityModel : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? VendorInvoiceItemHistoryEntityModel : T extends EntityEnum.VENDOR_HISTORY ? VendorHistoryEntityModel : T extends EntityEnum.WEBSITE_LEAD ? WebsiteLeadEntityModel : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? WebsiteNewsletterSubscriptionEntityModel : T extends EntityEnum.WORK_FROM_HOME_HISTORY ? WorkFromHomeHistoryEntityModel : T extends EntityEnum.LEAVE_HISTORY ? LeaveHistoryEntityModel : T extends EntityEnum.BANK_HISTORY ? BankHistoryEntityModel : T extends EntityEnum.REIMBURSEMENT_HISTORY ? ReimbursementHistoryEntityModel : T extends EntityEnum.CLIENT_USER_MAPPING ? ClientUserMappingEntityModel : T extends EntityEnum.CLIENT_INTRODUCING_MAPPING ? ClientIntroducingMappingEntityModel : T extends EntityEnum.BILLING_PAYMENT ? BillingPaymentEntityModel : T extends EntityEnum.HOLIDAY_LIST ? HolidayListEntityModel : T extends EntityEnum.CRON_JOBS ? CronJobsEntityModel : T extends EntityEnum.TO_DO_LIST ? ToDoListEntityModel : T extends EntityEnum.CLIENT_QUOTE ? ClientQuoteEntityModel : T extends EntityEnum.CLIENT_QUOTE_RATE ? ClientQuoteRateEntityModel : UserEntityModel;
382
+ export type EnumToModel<T extends EntityEnum | VirtualEntityEnum> = T extends EntityEnum.BILLING ? BillingEntityModel : T extends EntityEnum.BILLING_HISTORY ? BillingHistoryEntityModel : T extends EntityEnum.CLIENT ? ClientEntityModel : T extends EntityEnum.INTERMEDIARY_BANK ? IntermediaryBankEntityModel : T extends EntityEnum.PROJECT ? ProjectEntityModel : T extends EntityEnum.PROJECT_USER_MAPPING ? ProjectUserMappingEntityModel : T extends EntityEnum.REIMBURSEMENT ? ReimbursementEntityModel : T extends EntityEnum.REIMBURSEMENT_EXPENSE ? ReimbursementExpenseEntityModel : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? BillingReimbursementExpneseEntityModel : T extends EntityEnum.BILLING_REIMBURESMENT_EXPENSE_HISTORY ? BillingReimbursementExpenseHistoryEntityModel : T extends EntityEnum.LEAVE ? LeaveEntityModel : T extends EntityEnum.WORK_FROM_HOME ? WorkFromHomeEntityModel : T extends EntityEnum.HOLIDAY ? HolidayEntityModel : T extends VirtualEntityEnum.LEAVE_COUNT ? LeaveCountVirtualEntityModel : T extends EntityEnum.CLIENT_AFFILIATE ? ClientAffiliateEntityModel : T extends EntityEnum.BANK ? BankEntityModel : T extends EntityEnum.CONFIGURATION ? ConfigurationEntityModel : T extends EntityEnum.TASK ? TaskEntityModel : T extends EntityEnum.BILLING_TIMESHEET ? BillingTimesheetEntityModel : T extends EntityEnum.BILLING_TIMESHEET_HISTORY ? BillingTimesheetHistoryEntityModel : T extends EntityEnum.TIMESHEET ? TimesheetEntityModel : T extends EntityEnum.TIMESHEET_HISTORY ? TimesheetHistoryEntityModel : T extends EntityEnum.COUNTRY ? CountryEntityModel : T extends EntityEnum.BILLING_TRANSACTION ? BillingTransactionEntityModel : T extends EntityEnum.BILLING_TRANSACTION_HISTORY ? BillingTransactionHistoryEntityModel : T extends EntityEnum.ADDRESS_BOOK ? AddressBookEntityModel : T extends EntityEnum.STATE ? StateEntityModel : T extends EntityEnum.GST_RATE ? GstRateEntityModel : T extends EntityEnum.ORGANIZATION_TYPE ? OrganizationTypeEntityModel : T extends EntityEnum.TDS_RATE ? TdsRateEntityModel : T extends EntityEnum.ORGANIZATION_TYPE_TDS_RATE_MAPPING ? OrganizationTypeTdsRateMappingEntityModel : T extends EntityEnum.VOUCHER_TYPE ? VoucherTypeEntityModel : T extends EntityEnum.TDS_RATE_VOUCHER_TYPE_MAPPING ? TdsRateVoucherTypeMappingEntityModel : T extends EntityEnum.ORGANIZATION ? OrganizationEntityModel : T extends EntityEnum.INDUSTRY ? IndustryEntityModel : T extends EntityEnum.EXPENSE_TYPE ? ExpenseTypeEntityModel : T extends EntityEnum.DESIGNATION ? DesignationEntityModel : T extends EntityEnum.RATE ? RateEntityModel : T extends EntityEnum.ROLE ? RoleEntityModel : T extends EntityEnum.ROLE_PERMISSION_MAPPING ? RolePermissionMappingEntityModel : T extends EntityEnum.PERMISSION ? PermissionEntityModel : T extends EntityEnum.EXPENSE_HEAD ? ExpenseHeadEntityModel : T extends EntityEnum.DOCUMENT_UPLOAD ? DocumentUploadEntityModel : T extends EntityEnum.VENDOR ? VendorEntityModel : T extends EntityEnum.VENDOR_INVOICE ? VendorInvoiceEntityModel : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? VendorInvoiceHistoryEntityModel : T extends EntityEnum.OFFICE_LOCATION ? OfficeLocationEntityModel : T extends EntityEnum.VENDOR_INVOICE_ITEM ? VendorInvoiceItemEntityModel : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? VendorInvoiceItemHistoryEntityModel : T extends EntityEnum.VENDOR_HISTORY ? VendorHistoryEntityModel : T extends EntityEnum.WEBSITE_LEAD ? WebsiteLeadEntityModel : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? WebsiteNewsletterSubscriptionEntityModel : T extends EntityEnum.WORK_FROM_HOME_HISTORY ? WorkFromHomeHistoryEntityModel : T extends EntityEnum.LEAVE_HISTORY ? LeaveHistoryEntityModel : T extends EntityEnum.BANK_HISTORY ? BankHistoryEntityModel : T extends EntityEnum.REIMBURSEMENT_HISTORY ? ReimbursementHistoryEntityModel : T extends EntityEnum.CLIENT_USER_MAPPING ? ClientUserMappingEntityModel : T extends EntityEnum.CLIENT_INTRODUCING_MAPPING ? ClientIntroducingMappingEntityModel : T extends EntityEnum.BILLING_PAYMENT ? BillingPaymentEntityModel : T extends EntityEnum.HOLIDAY_LIST ? HolidayListEntityModel : T extends EntityEnum.CRON_JOBS ? CronJobsEntityModel : T extends EntityEnum.TO_DO_LIST ? ToDoListEntityModel : T extends EntityEnum.CLIENT_QUOTE ? ClientQuoteEntityModel : T extends EntityEnum.CLIENT_QUOTE_RATE ? ClientQuoteRateEntityModel : T extends EntityEnum.BILLING_PROFILE ? BillingProfileEntityModel : UserEntityModel;
380
383
  export type EntityMap = {
381
384
  [key in EntityEnum | VirtualEntityEnum]: EnumToModel<key>[];
382
385
  };
@@ -97,6 +97,7 @@ var EntityEnum;
97
97
  EntityEnum["VENDOR_HISTORY"] = "vendor_history";
98
98
  EntityEnum["CLIENT_QUOTE"] = "client_quote";
99
99
  EntityEnum["CLIENT_QUOTE_RATE"] = "client_quote_rate";
100
+ EntityEnum["BILLING_PROFILE"] = "billing_profile";
100
101
  })(EntityEnum || (exports.EntityEnum = EntityEnum = {}));
101
102
  var VirtualEntityEnum;
102
103
  (function (VirtualEntityEnum) {
@@ -1,18 +1,5 @@
1
- import { HistoryOperationEnum } from "../enums/history_operation.enum";
2
- import { EntityEnum } from "../interface/entity.utils.interface";
3
- import { IBankHistoryEntity } from "../interface/bank_history.entity.interface";
4
- import { RelationConfigs } from "../interface/relation-config.interface";
5
- import { BaseEntityModel } from "./base.entity.model";
6
- export declare class BankHistoryEntityModel extends BaseEntityModel<EntityEnum.BANK_HISTORY> implements IBankHistoryEntity {
7
- id: number;
8
- entityId: number;
9
- operation: HistoryOperationEnum;
10
- data: string;
11
- createdOn: number;
12
- updatedOn: number;
13
- createdBy: number;
14
- updatedBy: number;
15
- static relationConfigs: RelationConfigs<[], EntityEnum.BANK_HISTORY>;
16
- static fromEntity(entity: IBankHistoryEntity): BankHistoryEntityModel;
17
- getRelationConfigs(): [];
1
+ import { EntityEnum, IBaseHistoryEntity } from "../interface/entity.utils.interface";
2
+ import { BaseHistoryEntityModel } from "./base_history.entity.model";
3
+ export declare class BankHistoryEntityModel extends BaseHistoryEntityModel<EntityEnum.BANK_HISTORY> {
4
+ static fromEntity(entity: IBaseHistoryEntity): BankHistoryEntityModel;
18
5
  }
@@ -1,29 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BankHistoryEntityModel = void 0;
4
- const history_operation_enum_1 = require("../enums/history_operation.enum");
5
4
  const entity_utils_interface_1 = require("../interface/entity.utils.interface");
6
- const base_entity_model_1 = require("./base.entity.model");
7
- class BankHistoryEntityModel extends base_entity_model_1.BaseEntityModel {
8
- constructor() {
9
- super(...arguments);
10
- this.id = 0;
11
- this.entityId = 0;
12
- this.operation = history_operation_enum_1.HistoryOperationEnum.CREATE;
13
- this.data = "";
14
- this.createdOn = 0;
15
- this.updatedOn = 0;
16
- this.createdBy = 0;
17
- this.updatedBy = 0;
18
- }
5
+ const base_history_entity_model_1 = require("./base_history.entity.model");
6
+ class BankHistoryEntityModel extends base_history_entity_model_1.BaseHistoryEntityModel {
19
7
  static fromEntity(entity) {
20
- const result = new BankHistoryEntityModel(entity_utils_interface_1.EntityEnum.BANK_HISTORY);
21
- Object.assign(result, entity);
22
- return result;
23
- }
24
- getRelationConfigs() {
25
- return BankHistoryEntityModel.relationConfigs;
8
+ return base_history_entity_model_1.BaseHistoryEntityModel.createFromEntity(entity_utils_interface_1.EntityEnum.BANK_HISTORY, entity);
26
9
  }
27
10
  }
28
11
  exports.BankHistoryEntityModel = BankHistoryEntityModel;
29
- BankHistoryEntityModel.relationConfigs = [];
@@ -0,0 +1,17 @@
1
+ import { HistoryOperationEnum } from "../enums/history_operation.enum";
2
+ import { EntityEnum, IBaseHistoryEntity } from "../interface/entity.utils.interface";
3
+ import { RelationConfigs } from "../interface/relation-config.interface";
4
+ import { BaseEntityModel } from "./base.entity.model";
5
+ export declare class BaseHistoryEntityModel<E extends EntityEnum> extends BaseEntityModel<E> implements IBaseHistoryEntity {
6
+ id: number;
7
+ entityId: number;
8
+ operation: HistoryOperationEnum;
9
+ data: string;
10
+ createdOn: number;
11
+ updatedOn: number;
12
+ createdBy: number;
13
+ updatedBy: number;
14
+ static relationConfigs: RelationConfigs<[], EntityEnum>;
15
+ static createFromEntity<E extends EntityEnum>(entityEnum: E, entity: IBaseHistoryEntity): BaseHistoryEntityModel<E>;
16
+ getRelationConfigs(): [];
17
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BaseHistoryEntityModel = void 0;
4
+ const history_operation_enum_1 = require("../enums/history_operation.enum");
5
+ const base_entity_model_1 = require("./base.entity.model");
6
+ class BaseHistoryEntityModel extends base_entity_model_1.BaseEntityModel {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.id = 0;
10
+ this.entityId = 0;
11
+ this.operation = history_operation_enum_1.HistoryOperationEnum.CREATE;
12
+ this.data = "";
13
+ this.createdOn = 0;
14
+ this.updatedOn = 0;
15
+ this.createdBy = 0;
16
+ this.updatedBy = 0;
17
+ }
18
+ // Renamed to avoid collision with subclass overrides
19
+ static createFromEntity(entityEnum, entity) {
20
+ const result = new BaseHistoryEntityModel(entityEnum);
21
+ Object.assign(result, entity);
22
+ return result;
23
+ }
24
+ getRelationConfigs() {
25
+ return BaseHistoryEntityModel.relationConfigs;
26
+ }
27
+ }
28
+ exports.BaseHistoryEntityModel = BaseHistoryEntityModel;
29
+ BaseHistoryEntityModel.relationConfigs = [];
@@ -0,0 +1,17 @@
1
+ import { BillingProfileName } from "../enums/billing_profile.enum";
2
+ import { IBillingProfileEntity } from "../interface/billing_profile.entity.interface";
3
+ import { EntityEnum } from "../interface/entity.utils.interface";
4
+ import { BaseEntityModel } from "./base.entity.model";
5
+ export declare class BillingProfileEntityModel extends BaseEntityModel<EntityEnum.BILLING_PROFILE> implements IBillingProfileEntity {
6
+ id: number;
7
+ name: BillingProfileName;
8
+ logoFilePath: string;
9
+ pan: string;
10
+ createdOn: number;
11
+ updatedOn: number;
12
+ createdBy: number;
13
+ updatedBy: number;
14
+ constructor();
15
+ static fromEntity(entity: IBillingProfileEntity): BillingProfileEntityModel;
16
+ getRelationConfigs(): any[];
17
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BillingProfileEntityModel = void 0;
4
+ const entity_utils_interface_1 = require("../interface/entity.utils.interface");
5
+ const base_entity_model_1 = require("./base.entity.model");
6
+ class BillingProfileEntityModel extends base_entity_model_1.BaseEntityModel {
7
+ constructor() {
8
+ super(entity_utils_interface_1.EntityEnum.BILLING_PROFILE);
9
+ this.id = 0;
10
+ this.name = "";
11
+ this.logoFilePath = "";
12
+ this.pan = "";
13
+ this.createdOn = 0;
14
+ this.updatedOn = 0;
15
+ this.createdBy = 0;
16
+ this.updatedBy = 0;
17
+ }
18
+ static fromEntity(entity) {
19
+ const model = new BillingProfileEntityModel();
20
+ Object.assign(model, entity);
21
+ return model;
22
+ }
23
+ getRelationConfigs() {
24
+ return this.constructor.prototype.constructor.relationConfigs || [];
25
+ }
26
+ }
27
+ exports.BillingProfileEntityModel = BillingProfileEntityModel;
@@ -1,18 +1,5 @@
1
- import { HistoryOperationEnum } from "../enums/history_operation.enum";
2
- import { EntityEnum } from "../interface/entity.utils.interface";
3
- import { IBillingReimbursementExpenseHistoryEntity } from "../interface/billing-reimbursement-expense-history.entity.interface";
4
- import { RelationConfigs } from "../interface/relation-config.interface";
5
- import { BaseEntityModel } from "./base.entity.model";
6
- export declare class BillingReimbursementExpenseHistoryEntityModel extends BaseEntityModel<EntityEnum.BILLING_REIMBURESMENT_EXPENSE_HISTORY> implements IBillingReimbursementExpenseHistoryEntity {
7
- id: number;
8
- entityId: number;
9
- operation: HistoryOperationEnum;
10
- data: string;
11
- createdOn: number;
12
- updatedOn: number;
13
- createdBy: number;
14
- updatedBy: number;
15
- static relationConfigs: RelationConfigs<[], EntityEnum.BILLING_REIMBURESMENT_EXPENSE_HISTORY>;
16
- static fromEntity(entity: IBillingReimbursementExpenseHistoryEntity): BillingReimbursementExpenseHistoryEntityModel;
17
- getRelationConfigs(): [];
1
+ import { EntityEnum, IBaseHistoryEntity } from "../interface/entity.utils.interface";
2
+ import { BaseHistoryEntityModel } from "./base_history.entity.model";
3
+ export declare class BillingReimbursementExpenseHistoryEntityModel extends BaseHistoryEntityModel<EntityEnum.BILLING_REIMBURESMENT_EXPENSE_HISTORY> {
4
+ static fromEntity(entity: IBaseHistoryEntity): BillingReimbursementExpenseHistoryEntityModel;
18
5
  }
@@ -1,29 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BillingReimbursementExpenseHistoryEntityModel = void 0;
4
- const history_operation_enum_1 = require("../enums/history_operation.enum");
5
4
  const entity_utils_interface_1 = require("../interface/entity.utils.interface");
6
- const base_entity_model_1 = require("./base.entity.model");
7
- class BillingReimbursementExpenseHistoryEntityModel extends base_entity_model_1.BaseEntityModel {
8
- constructor() {
9
- super(...arguments);
10
- this.id = 0;
11
- this.entityId = 0;
12
- this.operation = history_operation_enum_1.HistoryOperationEnum.CREATE;
13
- this.data = "";
14
- this.createdOn = 0;
15
- this.updatedOn = 0;
16
- this.createdBy = 0;
17
- this.updatedBy = 0;
18
- }
5
+ const base_history_entity_model_1 = require("./base_history.entity.model");
6
+ class BillingReimbursementExpenseHistoryEntityModel extends base_history_entity_model_1.BaseHistoryEntityModel {
19
7
  static fromEntity(entity) {
20
- const result = new BillingReimbursementExpenseHistoryEntityModel(entity_utils_interface_1.EntityEnum.BILLING_REIMBURESMENT_EXPENSE_HISTORY);
21
- Object.assign(result, entity);
22
- return result;
23
- }
24
- getRelationConfigs() {
25
- return BillingReimbursementExpenseHistoryEntityModel.relationConfigs;
8
+ return base_history_entity_model_1.BaseHistoryEntityModel.createFromEntity(entity_utils_interface_1.EntityEnum.BILLING_REIMBURESMENT_EXPENSE_HISTORY, entity);
26
9
  }
27
10
  }
28
11
  exports.BillingReimbursementExpenseHistoryEntityModel = BillingReimbursementExpenseHistoryEntityModel;
29
- BillingReimbursementExpenseHistoryEntityModel.relationConfigs = [];
@@ -1,18 +1,5 @@
1
- import { HistoryOperationEnum } from "../enums/history_operation.enum";
2
- import { EntityEnum } from "../interface/entity.utils.interface";
3
- import { IBillingTransactionHistoryEntity } from "../interface/billing-transaction-history.entity";
4
- import { RelationConfigs } from "../interface/relation-config.interface";
5
- import { BaseEntityModel } from "./base.entity.model";
6
- export declare class BillingTransactionHistoryEntityModel extends BaseEntityModel<EntityEnum.BILLING_TRANSACTION_HISTORY> implements IBillingTransactionHistoryEntity {
7
- id: number;
8
- entityId: number;
9
- operation: HistoryOperationEnum;
10
- data: string;
11
- createdOn: number;
12
- updatedOn: number;
13
- createdBy: number;
14
- updatedBy: number;
15
- static relationConfigs: RelationConfigs<[], EntityEnum.BILLING_TRANSACTION_HISTORY>;
16
- static fromEntity(entity: IBillingTransactionHistoryEntity): BillingTransactionHistoryEntityModel;
17
- getRelationConfigs(): [];
1
+ import { EntityEnum, IBaseHistoryEntity } from "../interface/entity.utils.interface";
2
+ import { BaseHistoryEntityModel } from "./base_history.entity.model";
3
+ export declare class BillingTransactionHistoryEntityModel extends BaseHistoryEntityModel<EntityEnum.BILLING_TRANSACTION_HISTORY> {
4
+ static fromEntity(entity: IBaseHistoryEntity): BillingTransactionHistoryEntityModel;
18
5
  }
@@ -1,29 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BillingTransactionHistoryEntityModel = void 0;
4
- const history_operation_enum_1 = require("../enums/history_operation.enum");
5
4
  const entity_utils_interface_1 = require("../interface/entity.utils.interface");
6
- const base_entity_model_1 = require("./base.entity.model");
7
- class BillingTransactionHistoryEntityModel extends base_entity_model_1.BaseEntityModel {
8
- constructor() {
9
- super(...arguments);
10
- this.id = 0;
11
- this.entityId = 0;
12
- this.operation = history_operation_enum_1.HistoryOperationEnum.CREATE;
13
- this.data = "";
14
- this.createdOn = 0;
15
- this.updatedOn = 0;
16
- this.createdBy = 0;
17
- this.updatedBy = 0;
18
- }
5
+ const base_history_entity_model_1 = require("./base_history.entity.model");
6
+ class BillingTransactionHistoryEntityModel extends base_history_entity_model_1.BaseHistoryEntityModel {
19
7
  static fromEntity(entity) {
20
- const result = new BillingTransactionHistoryEntityModel(entity_utils_interface_1.EntityEnum.BILLING_TRANSACTION_HISTORY);
21
- Object.assign(result, entity);
22
- return result;
23
- }
24
- getRelationConfigs() {
25
- return BillingTransactionHistoryEntityModel.relationConfigs;
8
+ return base_history_entity_model_1.BaseHistoryEntityModel.createFromEntity(entity_utils_interface_1.EntityEnum.BILLING_TRANSACTION_HISTORY, entity);
26
9
  }
27
10
  }
28
11
  exports.BillingTransactionHistoryEntityModel = BillingTransactionHistoryEntityModel;
29
- BillingTransactionHistoryEntityModel.relationConfigs = [];
@@ -15,6 +15,7 @@ import { EntityEnum, Nullable } from "../interface/entity.utils.interface";
15
15
  import { RelationConfigs } from "../interface/relation-config.interface";
16
16
  import { BankEntityModel } from "./bank.entity.model";
17
17
  import { BaseEntityModel } from "./base.entity.model";
18
+ import { BillingProfileEntityModel } from "./billing-profile.entity.model";
18
19
  import { BillingReimbursementExpneseEntityModel } from "./billing-reimbursement-expense.entity.model";
19
20
  import { BillingTimesheetEntityModel } from "./billing-timesheet.entity.model";
20
21
  import { BillingTransactionEntityModel } from "./billing-transaction.model";
@@ -107,6 +108,7 @@ export declare class BillingEntityModel extends BaseEntityModel<EntityEnum.BILLI
107
108
  getTotalRecievableAmount(): number;
108
109
  validateAdvanceBillingId(adjustedBillingTransactions: IBillingTransactionEntity[]): void;
109
110
  getApprovedBillingTransactionsTotalAmount(): number;
111
+ getCurrentBillingBillingProfile(billingProfiles: BillingProfileEntityModel[]): BillingProfileEntityModel[];
110
112
  static getNextInvoiceNumber(params: {
111
113
  type: BillingInvoiceNumberPrefixEnum;
112
114
  invoiceDate: Date;
@@ -280,6 +280,10 @@ class BillingEntityModel extends base_entity_model_1.BaseEntityModel {
280
280
  var _a, _b;
281
281
  return (0, utils_1.sumNormalised)((_b = (_a = this.billingTransactions) === null || _a === void 0 ? void 0 : _a.filter((entity) => ![billing_transaction_status_enum_1.BillingTransactionStatusEnum.CREDITNOTE_APPROVAL_PENDING, billing_transaction_status_enum_1.BillingTransactionStatusEnum.WRITEOFF_APPROVAL_PENDING].includes(entity.status))) !== null && _b !== void 0 ? _b : [], "amount");
282
282
  }
283
+ getCurrentBillingBillingProfile(billingProfiles) {
284
+ const billingParticularsOfCurrentBilling = JSON.parse(this.particulars);
285
+ return billingProfiles.filter((profile) => profile.name === billingParticularsOfCurrentBilling.name);
286
+ }
283
287
  static getNextInvoiceNumber(params) {
284
288
  // Draft numbers never use FY-based logic
285
289
  if (params.type === invoice_number_prefix_enum_1.BillingInvoiceNumberPrefixEnum.DRAFT) {
@@ -1,18 +1,5 @@
1
- import { HistoryOperationEnum } from "../enums/history_operation.enum";
2
- import { EntityEnum } from "../interface/entity.utils.interface";
3
- import { IBillingHistoryEntity } from "../interface/billing_history.entity.interface";
4
- import { RelationConfigs } from "../interface/relation-config.interface";
5
- import { BaseEntityModel } from "./base.entity.model";
6
- export declare class BillingHistoryEntityModel extends BaseEntityModel<EntityEnum.BILLING_HISTORY> implements IBillingHistoryEntity {
7
- id: number;
8
- entityId: number;
9
- operation: HistoryOperationEnum;
10
- data: string;
11
- createdOn: number;
12
- updatedOn: number;
13
- createdBy: number;
14
- updatedBy: number;
15
- static relationConfigs: RelationConfigs<[], EntityEnum.BILLING_HISTORY>;
16
- static fromEntity(entity: IBillingHistoryEntity): BillingHistoryEntityModel;
17
- getRelationConfigs(): [];
1
+ import { EntityEnum, IBaseHistoryEntity } from "../interface/entity.utils.interface";
2
+ import { BaseHistoryEntityModel } from "./base_history.entity.model";
3
+ export declare class BillingHistoryEntityModel extends BaseHistoryEntityModel<EntityEnum.BILLING_HISTORY> {
4
+ static fromEntity(entity: IBaseHistoryEntity): BillingHistoryEntityModel;
18
5
  }
@@ -1,29 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BillingHistoryEntityModel = void 0;
4
- const history_operation_enum_1 = require("../enums/history_operation.enum");
5
4
  const entity_utils_interface_1 = require("../interface/entity.utils.interface");
6
- const base_entity_model_1 = require("./base.entity.model");
7
- class BillingHistoryEntityModel extends base_entity_model_1.BaseEntityModel {
8
- constructor() {
9
- super(...arguments);
10
- this.id = 0;
11
- this.entityId = 0;
12
- this.operation = history_operation_enum_1.HistoryOperationEnum.CREATE;
13
- this.data = "";
14
- this.createdOn = 0;
15
- this.updatedOn = 0;
16
- this.createdBy = 0;
17
- this.updatedBy = 0;
18
- }
5
+ const base_history_entity_model_1 = require("./base_history.entity.model");
6
+ class BillingHistoryEntityModel extends base_history_entity_model_1.BaseHistoryEntityModel {
19
7
  static fromEntity(entity) {
20
- const result = new BillingHistoryEntityModel(entity_utils_interface_1.EntityEnum.BILLING_HISTORY);
21
- Object.assign(result, entity);
22
- return result;
23
- }
24
- getRelationConfigs() {
25
- return BillingHistoryEntityModel.relationConfigs;
8
+ return base_history_entity_model_1.BaseHistoryEntityModel.createFromEntity(entity_utils_interface_1.EntityEnum.BILLING_HISTORY, entity);
26
9
  }
27
10
  }
28
11
  exports.BillingHistoryEntityModel = BillingHistoryEntityModel;
29
- BillingHistoryEntityModel.relationConfigs = [];
@@ -1,18 +1,5 @@
1
- import { HistoryOperationEnum } from "../enums/history_operation.enum";
2
- import { EntityEnum } from "../interface/entity.utils.interface";
3
- import { IBillingTimesheetHistoryEntity } from "../interface/billing_timesheet_history.entity.interface";
4
- import { RelationConfigs } from "../interface/relation-config.interface";
5
- import { BaseEntityModel } from "./base.entity.model";
6
- export declare class BillingTimesheetHistoryEntityModel extends BaseEntityModel<EntityEnum.BILLING_TIMESHEET_HISTORY> implements IBillingTimesheetHistoryEntity {
7
- id: number;
8
- entityId: number;
9
- operation: HistoryOperationEnum;
10
- data: string;
11
- createdOn: number;
12
- updatedOn: number;
13
- createdBy: number;
14
- updatedBy: number;
15
- static relationConfigs: RelationConfigs<[], EntityEnum.BILLING_TIMESHEET_HISTORY>;
16
- static fromEntity(entity: IBillingTimesheetHistoryEntity): BillingTimesheetHistoryEntityModel;
17
- getRelationConfigs(): [];
1
+ import { EntityEnum, IBaseHistoryEntity } from "../interface/entity.utils.interface";
2
+ import { BaseHistoryEntityModel } from "./base_history.entity.model";
3
+ export declare class BillingTimesheetHistoryEntityModel extends BaseHistoryEntityModel<EntityEnum.BILLING_TIMESHEET_HISTORY> {
4
+ static fromEntity(entity: IBaseHistoryEntity): BillingTimesheetHistoryEntityModel;
18
5
  }
@@ -1,29 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BillingTimesheetHistoryEntityModel = void 0;
4
- const history_operation_enum_1 = require("../enums/history_operation.enum");
5
4
  const entity_utils_interface_1 = require("../interface/entity.utils.interface");
6
- const base_entity_model_1 = require("./base.entity.model");
7
- class BillingTimesheetHistoryEntityModel extends base_entity_model_1.BaseEntityModel {
8
- constructor() {
9
- super(...arguments);
10
- this.id = 0;
11
- this.entityId = 0;
12
- this.operation = history_operation_enum_1.HistoryOperationEnum.CREATE;
13
- this.data = "";
14
- this.createdOn = 0;
15
- this.updatedOn = 0;
16
- this.createdBy = 0;
17
- this.updatedBy = 0;
18
- }
5
+ const base_history_entity_model_1 = require("./base_history.entity.model");
6
+ class BillingTimesheetHistoryEntityModel extends base_history_entity_model_1.BaseHistoryEntityModel {
19
7
  static fromEntity(entity) {
20
- const result = new BillingTimesheetHistoryEntityModel(entity_utils_interface_1.EntityEnum.BILLING_TIMESHEET_HISTORY);
21
- Object.assign(result, entity);
22
- return result;
23
- }
24
- getRelationConfigs() {
25
- return BillingTimesheetHistoryEntityModel.relationConfigs;
8
+ return base_history_entity_model_1.BaseHistoryEntityModel.createFromEntity(entity_utils_interface_1.EntityEnum.BILLING_TIMESHEET_HISTORY, entity);
26
9
  }
27
10
  }
28
11
  exports.BillingTimesheetHistoryEntityModel = BillingTimesheetHistoryEntityModel;
29
- BillingTimesheetHistoryEntityModel.relationConfigs = [];
@@ -14,6 +14,7 @@ const address_book_model_1 = require("./address_book.model");
14
14
  const bank_entity_model_1 = require("./bank.entity.model");
15
15
  const bank_history_entity_model_1 = require("./bank_history.entity.model");
16
16
  const base_entity_model_1 = require("./base.entity.model");
17
+ const billing_profile_entity_model_1 = require("./billing-profile.entity.model");
17
18
  const billing_reimbursement_expense_history_entity_model_1 = require("./billing-reimbursement-expense-history.entity.model");
18
19
  const billing_reimbursement_expense_entity_model_1 = require("./billing-reimbursement-expense.entity.model");
19
20
  const billing_timesheet_entity_model_1 = require("./billing-timesheet.entity.model");
@@ -170,6 +171,7 @@ exports.entityEnumToEntityModel = {
170
171
  [entity_utils_interface_1.EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION]: website_newsletter_subscription_entity_model_1.WebsiteNewsletterSubscriptionEntityModel.fromEntity,
171
172
  [entity_utils_interface_1.EntityEnum.CLIENT_QUOTE]: client_quote_entity_model_1.ClientQuoteEntityModel.fromEntity,
172
173
  [entity_utils_interface_1.EntityEnum.CLIENT_QUOTE_RATE]: client_quote_rate_entity_model_1.ClientQuoteRateEntityModel.fromEntity,
174
+ [entity_utils_interface_1.EntityEnum.BILLING_PROFILE]: billing_profile_entity_model_1.BillingProfileEntityModel.fromEntity,
173
175
  };
174
176
  function entityMapToModels(entityMap) {
175
177
  for (const entityName in entityMap) {
@@ -1,18 +1,5 @@
1
- import { HistoryOperationEnum } from "../enums/history_operation.enum";
2
- import { EntityEnum } from "../interface/entity.utils.interface";
3
- import { ILeaveHistoryEntity } from "../interface/leave_history.entity.interface";
4
- import { RelationConfigs } from "../interface/relation-config.interface";
5
- import { BaseEntityModel } from "./base.entity.model";
6
- export declare class LeaveHistoryEntityModel extends BaseEntityModel<EntityEnum.LEAVE_HISTORY> implements ILeaveHistoryEntity {
7
- id: number;
8
- entityId: number;
9
- operation: HistoryOperationEnum;
10
- data: string;
11
- createdOn: number;
12
- updatedOn: number;
13
- createdBy: number;
14
- updatedBy: number;
15
- static relationConfigs: RelationConfigs<[], EntityEnum.LEAVE_HISTORY>;
16
- static fromEntity(entity: ILeaveHistoryEntity): LeaveHistoryEntityModel;
17
- getRelationConfigs(): [];
1
+ import { EntityEnum, IBaseHistoryEntity } from "../interface/entity.utils.interface";
2
+ import { BaseHistoryEntityModel } from "./base_history.entity.model";
3
+ export declare class LeaveHistoryEntityModel extends BaseHistoryEntityModel<EntityEnum.LEAVE_HISTORY> {
4
+ static fromEntity(entity: IBaseHistoryEntity): LeaveHistoryEntityModel;
18
5
  }
@@ -1,29 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LeaveHistoryEntityModel = void 0;
4
- const history_operation_enum_1 = require("../enums/history_operation.enum");
5
4
  const entity_utils_interface_1 = require("../interface/entity.utils.interface");
6
- const base_entity_model_1 = require("./base.entity.model");
7
- class LeaveHistoryEntityModel extends base_entity_model_1.BaseEntityModel {
8
- constructor() {
9
- super(...arguments);
10
- this.id = 0;
11
- this.entityId = 0;
12
- this.operation = history_operation_enum_1.HistoryOperationEnum.CREATE;
13
- this.data = "";
14
- this.createdOn = 0;
15
- this.updatedOn = 0;
16
- this.createdBy = 0;
17
- this.updatedBy = 0;
18
- }
5
+ const base_history_entity_model_1 = require("./base_history.entity.model");
6
+ class LeaveHistoryEntityModel extends base_history_entity_model_1.BaseHistoryEntityModel {
19
7
  static fromEntity(entity) {
20
- const result = new LeaveHistoryEntityModel(entity_utils_interface_1.EntityEnum.LEAVE_HISTORY);
21
- Object.assign(result, entity);
22
- return result;
23
- }
24
- getRelationConfigs() {
25
- return LeaveHistoryEntityModel.relationConfigs;
8
+ return base_history_entity_model_1.BaseHistoryEntityModel.createFromEntity(entity_utils_interface_1.EntityEnum.LEAVE_HISTORY, entity);
26
9
  }
27
10
  }
28
11
  exports.LeaveHistoryEntityModel = LeaveHistoryEntityModel;
29
- LeaveHistoryEntityModel.relationConfigs = [];
@@ -1,18 +1,5 @@
1
- import { HistoryOperationEnum } from "../enums/history_operation.enum";
2
- import { EntityEnum } from "../interface/entity.utils.interface";
3
- import { IReimbursementHistoryEntity } from "../interface/reimbursement_history.entity.interface";
4
- import { RelationConfigs } from "../interface/relation-config.interface";
5
- import { BaseEntityModel } from "./base.entity.model";
6
- export declare class ReimbursementHistoryEntityModel extends BaseEntityModel<EntityEnum.REIMBURSEMENT_HISTORY> implements IReimbursementHistoryEntity {
7
- id: number;
8
- entityId: number;
9
- operation: HistoryOperationEnum;
10
- data: string;
11
- createdOn: number;
12
- updatedOn: number;
13
- createdBy: number;
14
- updatedBy: number;
15
- static relationConfigs: RelationConfigs<[], EntityEnum.REIMBURSEMENT_HISTORY>;
16
- static fromEntity(entity: IReimbursementHistoryEntity): ReimbursementHistoryEntityModel;
17
- getRelationConfigs(): [];
1
+ import { EntityEnum, IBaseHistoryEntity } from "../interface/entity.utils.interface";
2
+ import { BaseHistoryEntityModel } from "./base_history.entity.model";
3
+ export declare class ReimbursementHistoryEntityModel extends BaseHistoryEntityModel<EntityEnum.REIMBURSEMENT_HISTORY> {
4
+ static fromEntity(entity: IBaseHistoryEntity): ReimbursementHistoryEntityModel;
18
5
  }
@@ -1,29 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ReimbursementHistoryEntityModel = void 0;
4
- const history_operation_enum_1 = require("../enums/history_operation.enum");
5
4
  const entity_utils_interface_1 = require("../interface/entity.utils.interface");
6
- const base_entity_model_1 = require("./base.entity.model");
7
- class ReimbursementHistoryEntityModel extends base_entity_model_1.BaseEntityModel {
8
- constructor() {
9
- super(...arguments);
10
- this.id = 0;
11
- this.entityId = 0;
12
- this.operation = history_operation_enum_1.HistoryOperationEnum.CREATE;
13
- this.data = "";
14
- this.createdOn = 0;
15
- this.updatedOn = 0;
16
- this.createdBy = 0;
17
- this.updatedBy = 0;
18
- }
5
+ const base_history_entity_model_1 = require("./base_history.entity.model");
6
+ class ReimbursementHistoryEntityModel extends base_history_entity_model_1.BaseHistoryEntityModel {
19
7
  static fromEntity(entity) {
20
- const result = new ReimbursementHistoryEntityModel(entity_utils_interface_1.EntityEnum.REIMBURSEMENT_HISTORY);
21
- Object.assign(result, entity);
22
- return result;
23
- }
24
- getRelationConfigs() {
25
- return ReimbursementHistoryEntityModel.relationConfigs;
8
+ return base_history_entity_model_1.BaseHistoryEntityModel.createFromEntity(entity_utils_interface_1.EntityEnum.REIMBURSEMENT_HISTORY, entity);
26
9
  }
27
10
  }
28
11
  exports.ReimbursementHistoryEntityModel = ReimbursementHistoryEntityModel;
29
- ReimbursementHistoryEntityModel.relationConfigs = [];
@@ -1,18 +1,5 @@
1
- import { HistoryOperationEnum } from "../enums/history_operation.enum";
2
- import { EntityEnum } from "../interface/entity.utils.interface";
3
- import { ITimesheetHistoryEntity } from "../interface/timesheet_history.entity.interface";
4
- import { RelationConfigs } from "../interface/relation-config.interface";
5
- import { BaseEntityModel } from "./base.entity.model";
6
- export declare class TimesheetHistoryEntityModel extends BaseEntityModel<EntityEnum.TIMESHEET_HISTORY> implements ITimesheetHistoryEntity {
7
- id: number;
8
- entityId: number;
9
- operation: HistoryOperationEnum;
10
- data: string;
11
- createdOn: number;
12
- updatedOn: number;
13
- createdBy: number;
14
- updatedBy: number;
15
- static relationConfigs: RelationConfigs<[], EntityEnum.TIMESHEET_HISTORY>;
16
- static fromEntity(entity: ITimesheetHistoryEntity): TimesheetHistoryEntityModel;
17
- getRelationConfigs(): [];
1
+ import { EntityEnum, IBaseHistoryEntity } from "../interface/entity.utils.interface";
2
+ import { BaseHistoryEntityModel } from "./base_history.entity.model";
3
+ export declare class TimesheetHistoryEntityModel extends BaseHistoryEntityModel<EntityEnum.TIMESHEET_HISTORY> {
4
+ static fromEntity(entity: IBaseHistoryEntity): TimesheetHistoryEntityModel;
18
5
  }
@@ -1,29 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TimesheetHistoryEntityModel = void 0;
4
- const history_operation_enum_1 = require("../enums/history_operation.enum");
5
4
  const entity_utils_interface_1 = require("../interface/entity.utils.interface");
6
- const base_entity_model_1 = require("./base.entity.model");
7
- class TimesheetHistoryEntityModel extends base_entity_model_1.BaseEntityModel {
8
- constructor() {
9
- super(...arguments);
10
- this.id = 0;
11
- this.entityId = 0;
12
- this.operation = history_operation_enum_1.HistoryOperationEnum.CREATE;
13
- this.data = "";
14
- this.createdOn = 0;
15
- this.updatedOn = 0;
16
- this.createdBy = 0;
17
- this.updatedBy = 0;
18
- }
5
+ const base_history_entity_model_1 = require("./base_history.entity.model");
6
+ class TimesheetHistoryEntityModel extends base_history_entity_model_1.BaseHistoryEntityModel {
19
7
  static fromEntity(entity) {
20
- const result = new TimesheetHistoryEntityModel(entity_utils_interface_1.EntityEnum.TIMESHEET_HISTORY);
21
- Object.assign(result, entity);
22
- return result;
23
- }
24
- getRelationConfigs() {
25
- return TimesheetHistoryEntityModel.relationConfigs;
8
+ return base_history_entity_model_1.BaseHistoryEntityModel.createFromEntity(entity_utils_interface_1.EntityEnum.TIMESHEET_HISTORY, entity);
26
9
  }
27
10
  }
28
11
  exports.TimesheetHistoryEntityModel = TimesheetHistoryEntityModel;
29
- TimesheetHistoryEntityModel.relationConfigs = [];
@@ -1,18 +1,5 @@
1
- import { HistoryOperationEnum } from "../enums/history_operation.enum";
2
- import { EntityEnum } from "../interface/entity.utils.interface";
3
- import { RelationConfigs } from "../interface/relation-config.interface";
4
- import { IVendorHistoryEntity } from "../interface/vendor-history.entity.interface";
5
- import { BaseEntityModel } from "./base.entity.model";
6
- export declare class VendorHistoryEntityModel extends BaseEntityModel<EntityEnum.VENDOR_HISTORY> implements IVendorHistoryEntity {
7
- id: number;
8
- entityId: number;
9
- operation: HistoryOperationEnum;
10
- data: string;
11
- createdOn: number;
12
- updatedOn: number;
13
- createdBy: number;
14
- updatedBy: number;
15
- static relationConfigs: RelationConfigs<[], EntityEnum.VENDOR_HISTORY>;
16
- static fromEntity(entity: IVendorHistoryEntity): VendorHistoryEntityModel;
17
- getRelationConfigs(): [];
1
+ import { EntityEnum, IBaseHistoryEntity } from "../interface/entity.utils.interface";
2
+ import { BaseHistoryEntityModel } from "./base_history.entity.model";
3
+ export declare class VendorHistoryEntityModel extends BaseHistoryEntityModel<EntityEnum.VENDOR_HISTORY> {
4
+ static fromEntity(entity: IBaseHistoryEntity): VendorHistoryEntityModel;
18
5
  }
@@ -1,29 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VendorHistoryEntityModel = void 0;
4
- const history_operation_enum_1 = require("../enums/history_operation.enum");
5
4
  const entity_utils_interface_1 = require("../interface/entity.utils.interface");
6
- const base_entity_model_1 = require("./base.entity.model");
7
- class VendorHistoryEntityModel extends base_entity_model_1.BaseEntityModel {
8
- constructor() {
9
- super(...arguments);
10
- this.id = 0;
11
- this.entityId = 0;
12
- this.operation = history_operation_enum_1.HistoryOperationEnum.CREATE;
13
- this.data = "";
14
- this.createdOn = 0;
15
- this.updatedOn = 0;
16
- this.createdBy = 0;
17
- this.updatedBy = 0;
18
- }
5
+ const base_history_entity_model_1 = require("./base_history.entity.model");
6
+ class VendorHistoryEntityModel extends base_history_entity_model_1.BaseHistoryEntityModel {
19
7
  static fromEntity(entity) {
20
- const result = new VendorHistoryEntityModel(entity_utils_interface_1.EntityEnum.VENDOR_HISTORY);
21
- Object.assign(result, entity);
22
- return result;
23
- }
24
- getRelationConfigs() {
25
- return VendorHistoryEntityModel.relationConfigs;
8
+ return base_history_entity_model_1.BaseHistoryEntityModel.createFromEntity(entity_utils_interface_1.EntityEnum.VENDOR_HISTORY, entity);
26
9
  }
27
10
  }
28
11
  exports.VendorHistoryEntityModel = VendorHistoryEntityModel;
29
- VendorHistoryEntityModel.relationConfigs = [];
@@ -1,18 +1,5 @@
1
- import { HistoryOperationEnum } from "../enums/history_operation.enum";
2
- import { EntityEnum } from "../interface/entity.utils.interface";
3
- import { RelationConfigs } from "../interface/relation-config.interface";
4
- import { IVendorInvoiceHistoryEntity } from "../interface/vendot-invoice-history.entity.interface";
5
- import { BaseEntityModel } from "./base.entity.model";
6
- export declare class VendorInvoiceHistoryEntityModel extends BaseEntityModel<EntityEnum.VENDOR_INVOICE_HISTORY> implements IVendorInvoiceHistoryEntity {
7
- id: number;
8
- entityId: number;
9
- operation: HistoryOperationEnum;
10
- data: string;
11
- createdOn: number;
12
- updatedOn: number;
13
- createdBy: number;
14
- updatedBy: number;
15
- static relationConfigs: RelationConfigs<[], EntityEnum.VENDOR_INVOICE_HISTORY>;
16
- static fromEntity(entity: IVendorInvoiceHistoryEntity): VendorInvoiceHistoryEntityModel;
17
- getRelationConfigs(): [];
1
+ import { EntityEnum, IBaseHistoryEntity } from "../interface/entity.utils.interface";
2
+ import { BaseHistoryEntityModel } from "./base_history.entity.model";
3
+ export declare class VendorInvoiceHistoryEntityModel extends BaseHistoryEntityModel<EntityEnum.VENDOR_INVOICE_HISTORY> {
4
+ static fromEntity(entity: IBaseHistoryEntity): VendorInvoiceHistoryEntityModel;
18
5
  }
@@ -1,29 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VendorInvoiceHistoryEntityModel = void 0;
4
- const history_operation_enum_1 = require("../enums/history_operation.enum");
5
4
  const entity_utils_interface_1 = require("../interface/entity.utils.interface");
6
- const base_entity_model_1 = require("./base.entity.model");
7
- class VendorInvoiceHistoryEntityModel extends base_entity_model_1.BaseEntityModel {
8
- constructor() {
9
- super(...arguments);
10
- this.id = 0;
11
- this.entityId = 0;
12
- this.operation = history_operation_enum_1.HistoryOperationEnum.CREATE;
13
- this.data = "";
14
- this.createdOn = 0;
15
- this.updatedOn = 0;
16
- this.createdBy = 0;
17
- this.updatedBy = 0;
18
- }
5
+ const base_history_entity_model_1 = require("./base_history.entity.model");
6
+ class VendorInvoiceHistoryEntityModel extends base_history_entity_model_1.BaseHistoryEntityModel {
19
7
  static fromEntity(entity) {
20
- const result = new VendorInvoiceHistoryEntityModel(entity_utils_interface_1.EntityEnum.VENDOR_INVOICE_HISTORY);
21
- Object.assign(result, entity);
22
- return result;
23
- }
24
- getRelationConfigs() {
25
- return VendorInvoiceHistoryEntityModel.relationConfigs;
8
+ return base_history_entity_model_1.BaseHistoryEntityModel.createFromEntity(entity_utils_interface_1.EntityEnum.VENDOR_INVOICE_HISTORY, entity);
26
9
  }
27
10
  }
28
11
  exports.VendorInvoiceHistoryEntityModel = VendorInvoiceHistoryEntityModel;
29
- VendorInvoiceHistoryEntityModel.relationConfigs = [];
@@ -1,18 +1,5 @@
1
- import { HistoryOperationEnum } from "../enums/history_operation.enum";
2
- import { EntityEnum } from "../interface/entity.utils.interface";
3
- import { IVendorInvoiceItemHistoryEntity } from "../interface/vendor-invoice-item-history.entity.interface";
4
- import { RelationConfigs } from "../interface/relation-config.interface";
5
- import { BaseEntityModel } from "./base.entity.model";
6
- export declare class VendorInvoiceItemHistoryEntityModel extends BaseEntityModel<EntityEnum.VENDOR_INVOICE_ITEM_HISTORY> implements IVendorInvoiceItemHistoryEntity {
7
- id: number;
8
- entityId: number;
9
- operation: HistoryOperationEnum;
10
- data: string;
11
- createdOn: number;
12
- updatedOn: number;
13
- createdBy: number;
14
- updatedBy: number;
15
- static relationConfigs: RelationConfigs<[], EntityEnum.VENDOR_INVOICE_ITEM_HISTORY>;
16
- static fromEntity(entity: IVendorInvoiceItemHistoryEntity): VendorInvoiceItemHistoryEntityModel;
17
- getRelationConfigs(): [];
1
+ import { EntityEnum, IBaseHistoryEntity } from "../interface/entity.utils.interface";
2
+ import { BaseHistoryEntityModel } from "./base_history.entity.model";
3
+ export declare class VendorInvoiceItemHistoryEntityModel extends BaseHistoryEntityModel<EntityEnum.VENDOR_INVOICE_ITEM_HISTORY> {
4
+ static fromEntity(entity: IBaseHistoryEntity): VendorInvoiceItemHistoryEntityModel;
18
5
  }
@@ -1,29 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VendorInvoiceItemHistoryEntityModel = void 0;
4
- const history_operation_enum_1 = require("../enums/history_operation.enum");
5
4
  const entity_utils_interface_1 = require("../interface/entity.utils.interface");
6
- const base_entity_model_1 = require("./base.entity.model");
7
- class VendorInvoiceItemHistoryEntityModel extends base_entity_model_1.BaseEntityModel {
8
- constructor() {
9
- super(...arguments);
10
- this.id = 0;
11
- this.entityId = 0;
12
- this.operation = history_operation_enum_1.HistoryOperationEnum.CREATE;
13
- this.data = "";
14
- this.createdOn = 0;
15
- this.updatedOn = 0;
16
- this.createdBy = 0;
17
- this.updatedBy = 0;
18
- }
5
+ const base_history_entity_model_1 = require("./base_history.entity.model");
6
+ class VendorInvoiceItemHistoryEntityModel extends base_history_entity_model_1.BaseHistoryEntityModel {
19
7
  static fromEntity(entity) {
20
- const result = new VendorInvoiceItemHistoryEntityModel(entity_utils_interface_1.EntityEnum.VENDOR_INVOICE_ITEM_HISTORY);
21
- Object.assign(result, entity);
22
- return result;
23
- }
24
- getRelationConfigs() {
25
- return VendorInvoiceItemHistoryEntityModel.relationConfigs;
8
+ return base_history_entity_model_1.BaseHistoryEntityModel.createFromEntity(entity_utils_interface_1.EntityEnum.VENDOR_INVOICE_ITEM_HISTORY, entity);
26
9
  }
27
10
  }
28
11
  exports.VendorInvoiceItemHistoryEntityModel = VendorInvoiceItemHistoryEntityModel;
29
- VendorInvoiceItemHistoryEntityModel.relationConfigs = [];
@@ -1,18 +1,5 @@
1
- import { HistoryOperationEnum } from "../enums/history_operation.enum";
2
- import { EntityEnum } from "../interface/entity.utils.interface";
3
- import { IWorkFromHomeHistoryEntity } from "../interface/work_from_home_history.entity.interface";
4
- import { RelationConfigs } from "../interface/relation-config.interface";
5
- import { BaseEntityModel } from "./base.entity.model";
6
- export declare class WorkFromHomeHistoryEntityModel extends BaseEntityModel<EntityEnum.WORK_FROM_HOME_HISTORY> implements IWorkFromHomeHistoryEntity {
7
- id: number;
8
- entityId: number;
9
- operation: HistoryOperationEnum;
10
- data: string;
11
- createdOn: number;
12
- updatedOn: number;
13
- createdBy: number;
14
- updatedBy: number;
15
- static relationConfigs: RelationConfigs<[], EntityEnum.WORK_FROM_HOME_HISTORY>;
16
- static fromEntity(entity: IWorkFromHomeHistoryEntity): WorkFromHomeHistoryEntityModel;
17
- getRelationConfigs(): [];
1
+ import { EntityEnum, IBaseHistoryEntity } from "../interface/entity.utils.interface";
2
+ import { BaseHistoryEntityModel } from "./base_history.entity.model";
3
+ export declare class WorkFromHomeHistoryEntityModel extends BaseHistoryEntityModel<EntityEnum.WORK_FROM_HOME_HISTORY> {
4
+ static fromEntity(entity: IBaseHistoryEntity): WorkFromHomeHistoryEntityModel;
18
5
  }
@@ -1,29 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WorkFromHomeHistoryEntityModel = void 0;
4
- const history_operation_enum_1 = require("../enums/history_operation.enum");
5
4
  const entity_utils_interface_1 = require("../interface/entity.utils.interface");
6
- const base_entity_model_1 = require("./base.entity.model");
7
- class WorkFromHomeHistoryEntityModel extends base_entity_model_1.BaseEntityModel {
8
- constructor() {
9
- super(...arguments);
10
- this.id = 0;
11
- this.entityId = 0;
12
- this.operation = history_operation_enum_1.HistoryOperationEnum.CREATE;
13
- this.data = "";
14
- this.createdOn = 0;
15
- this.updatedOn = 0;
16
- this.createdBy = 0;
17
- this.updatedBy = 0;
18
- }
5
+ const base_history_entity_model_1 = require("./base_history.entity.model");
6
+ class WorkFromHomeHistoryEntityModel extends base_history_entity_model_1.BaseHistoryEntityModel {
19
7
  static fromEntity(entity) {
20
- const result = new WorkFromHomeHistoryEntityModel(entity_utils_interface_1.EntityEnum.WORK_FROM_HOME_HISTORY);
21
- Object.assign(result, entity);
22
- return result;
23
- }
24
- getRelationConfigs() {
25
- return WorkFromHomeHistoryEntityModel.relationConfigs;
8
+ return base_history_entity_model_1.BaseHistoryEntityModel.createFromEntity(entity_utils_interface_1.EntityEnum.WORK_FROM_HOME_HISTORY, entity);
26
9
  }
27
10
  }
28
11
  exports.WorkFromHomeHistoryEntityModel = WorkFromHomeHistoryEntityModel;
29
- WorkFromHomeHistoryEntityModel.relationConfigs = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "law-common",
3
- "version": "10.64.2-beta.0",
3
+ "version": "10.64.2-beta.10",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [