@platform-modules/foreign-ministry 1.0.83 → 1.0.84

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.
@@ -1,14 +1,14 @@
1
1
  import { BaseModel } from './BaseModel';
2
- import { PayslipRequests } from './PayslipRequestsModel';
3
- import { SalaryCertificateRequests } from './SalaryCertificateRequestsModel';
4
- import { AllowanceRequests } from './AllowanceRequestsModel';
5
- import { ReimbursementRequests } from './ReimbursementRequestsModel';
6
- import { BankAccountChangeRequests } from './BankAccountChangeRequestsModel';
7
- import { FinancialChats } from './FinancialChatsModel';
8
- import { FinancialApprovals } from './FinancialApprovalsModel';
9
- import { FinancialWorkFlow } from './FinancialWorkFlowModel';
10
- import { FinancialAttachments } from './FinancialAttachmentsModel';
11
- import { RequestTypeMaster } from './RequestTypeMasterModel';
2
+ import type { PayslipRequests } from './PayslipRequestsModel';
3
+ import type { SalaryCertificateRequests } from './SalaryCertificateRequestsModel';
4
+ import type { AllowanceRequests } from './AllowanceRequestsModel';
5
+ import type { ReimbursementRequests } from './ReimbursementRequestsModel';
6
+ import type { BankAccountChangeRequests } from './BankAccountChangeRequestsModel';
7
+ import type { FinancialChats } from './FinancialChatsModel';
8
+ import type { FinancialApprovals } from './FinancialApprovalsModel';
9
+ import type { FinancialWorkFlow } from './FinancialWorkFlowModel';
10
+ import type { FinancialAttachments } from './FinancialAttachmentsModel';
11
+ import type { RequestTypeMaster } from './RequestTypeMasterModel';
12
12
  export declare enum FinancialRequestStatus {
13
13
  DRAFT = "Draft",
14
14
  SUBMITTED = "Submitted",
@@ -12,16 +12,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.FinancialRequests = exports.FinancialRequestStatus = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
- const PayslipRequestsModel_1 = require("./PayslipRequestsModel");
16
- const SalaryCertificateRequestsModel_1 = require("./SalaryCertificateRequestsModel");
17
- const AllowanceRequestsModel_1 = require("./AllowanceRequestsModel");
18
- const ReimbursementRequestsModel_1 = require("./ReimbursementRequestsModel");
19
- const BankAccountChangeRequestsModel_1 = require("./BankAccountChangeRequestsModel");
20
- const FinancialChatsModel_1 = require("./FinancialChatsModel");
21
- const FinancialApprovalsModel_1 = require("./FinancialApprovalsModel");
22
- const FinancialWorkFlowModel_1 = require("./FinancialWorkFlowModel");
23
- const FinancialAttachmentsModel_1 = require("./FinancialAttachmentsModel");
24
- const RequestTypeMasterModel_1 = require("./RequestTypeMasterModel");
25
15
  var FinancialRequestStatus;
26
16
  (function (FinancialRequestStatus) {
27
17
  FinancialRequestStatus["DRAFT"] = "Draft";
@@ -108,45 +98,45 @@ __decorate([
108
98
  __metadata("design:type", Number)
109
99
  ], FinancialRequests.prototype, "current_approver_id", void 0);
110
100
  __decorate([
111
- (0, typeorm_1.OneToOne)(() => PayslipRequestsModel_1.PayslipRequests, payslip => payslip.financialRequest, { nullable: true }),
112
- __metadata("design:type", PayslipRequestsModel_1.PayslipRequests)
101
+ (0, typeorm_1.OneToOne)('PayslipRequests', 'financialRequest', { nullable: true }),
102
+ __metadata("design:type", Function)
113
103
  ], FinancialRequests.prototype, "payslipRequest", void 0);
114
104
  __decorate([
115
- (0, typeorm_1.OneToOne)(() => SalaryCertificateRequestsModel_1.SalaryCertificateRequests, cert => cert.financial_request_id, { nullable: true }),
116
- __metadata("design:type", SalaryCertificateRequestsModel_1.SalaryCertificateRequests)
105
+ (0, typeorm_1.OneToOne)('SalaryCertificateRequests', 'financialRequest', { nullable: true }),
106
+ __metadata("design:type", Function)
117
107
  ], FinancialRequests.prototype, "salaryCertificateRequest", void 0);
118
108
  __decorate([
119
- (0, typeorm_1.OneToOne)(() => AllowanceRequestsModel_1.AllowanceRequests, allowance => allowance.financial_request_id, { nullable: true }),
120
- __metadata("design:type", AllowanceRequestsModel_1.AllowanceRequests)
109
+ (0, typeorm_1.OneToOne)('AllowanceRequests', 'financialRequest', { nullable: true }),
110
+ __metadata("design:type", Function)
121
111
  ], FinancialRequests.prototype, "allowanceRequest", void 0);
122
112
  __decorate([
123
- (0, typeorm_1.OneToOne)(() => ReimbursementRequestsModel_1.ReimbursementRequests, reimb => reimb.financial_request_id, { nullable: true }),
124
- __metadata("design:type", ReimbursementRequestsModel_1.ReimbursementRequests)
113
+ (0, typeorm_1.OneToOne)('ReimbursementRequests', 'financialRequest', { nullable: true }),
114
+ __metadata("design:type", Function)
125
115
  ], FinancialRequests.prototype, "reimbursementRequest", void 0);
126
116
  __decorate([
127
- (0, typeorm_1.OneToOne)(() => BankAccountChangeRequestsModel_1.BankAccountChangeRequests, bank => bank.financial_request_id, { nullable: true }),
128
- __metadata("design:type", BankAccountChangeRequestsModel_1.BankAccountChangeRequests)
117
+ (0, typeorm_1.OneToOne)('BankAccountChangeRequests', 'financialRequest', { nullable: true }),
118
+ __metadata("design:type", Function)
129
119
  ], FinancialRequests.prototype, "bankAccountChangeRequest", void 0);
130
120
  __decorate([
131
- (0, typeorm_1.OneToMany)(() => FinancialChatsModel_1.FinancialChats, chat => chat.financialRequest),
121
+ (0, typeorm_1.OneToMany)('FinancialChats', 'financialRequest'),
132
122
  __metadata("design:type", Array)
133
123
  ], FinancialRequests.prototype, "chats", void 0);
134
124
  __decorate([
135
- (0, typeorm_1.OneToMany)(() => FinancialApprovalsModel_1.FinancialApprovals, approval => approval.financialRequest),
125
+ (0, typeorm_1.OneToMany)('FinancialApprovals', 'financialRequest'),
136
126
  __metadata("design:type", Array)
137
127
  ], FinancialRequests.prototype, "approvals", void 0);
138
128
  __decorate([
139
- (0, typeorm_1.OneToMany)(() => FinancialWorkFlowModel_1.FinancialWorkFlow, workflow => workflow.financialRequest),
129
+ (0, typeorm_1.OneToMany)('FinancialWorkFlow', 'financialRequest'),
140
130
  __metadata("design:type", Array)
141
131
  ], FinancialRequests.prototype, "workflows", void 0);
142
132
  __decorate([
143
- (0, typeorm_1.OneToMany)(() => FinancialAttachmentsModel_1.FinancialAttachments, attachment => attachment.financialRequest),
133
+ (0, typeorm_1.OneToMany)('FinancialAttachments', 'financialRequest'),
144
134
  __metadata("design:type", Array)
145
135
  ], FinancialRequests.prototype, "attachments", void 0);
146
136
  __decorate([
147
- (0, typeorm_1.ManyToOne)(() => RequestTypeMasterModel_1.RequestTypeMaster),
137
+ (0, typeorm_1.ManyToOne)('RequestTypeMaster'),
148
138
  (0, typeorm_1.JoinColumn)({ name: 'request_type_id' }),
149
- __metadata("design:type", RequestTypeMasterModel_1.RequestTypeMaster)
139
+ __metadata("design:type", Function)
150
140
  ], FinancialRequests.prototype, "requestType", void 0);
151
141
  exports.FinancialRequests = FinancialRequests = __decorate([
152
142
  (0, typeorm_1.Entity)({ name: 'financial_requests' }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.0.83",
3
+ "version": "1.0.84",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -1,15 +1,17 @@
1
1
  import { Column, Entity, OneToOne, OneToMany, ManyToOne, JoinColumn } from "typeorm";
2
2
  import { BaseModel } from './BaseModel';
3
- import { PayslipRequests } from './PayslipRequestsModel';
4
- import { SalaryCertificateRequests } from './SalaryCertificateRequestsModel';
5
- import { AllowanceRequests } from './AllowanceRequestsModel';
6
- import { ReimbursementRequests } from './ReimbursementRequestsModel';
7
- import { BankAccountChangeRequests } from './BankAccountChangeRequestsModel';
8
- import { FinancialChats } from './FinancialChatsModel';
9
- import { FinancialApprovals } from './FinancialApprovalsModel';
10
- import { FinancialWorkFlow } from './FinancialWorkFlowModel';
11
- import { FinancialAttachments } from './FinancialAttachmentsModel';
12
- import { RequestTypeMaster } from './RequestTypeMasterModel';
3
+
4
+ // Import types only (not for runtime)
5
+ import type { PayslipRequests } from './PayslipRequestsModel';
6
+ import type { SalaryCertificateRequests } from './SalaryCertificateRequestsModel';
7
+ import type { AllowanceRequests } from './AllowanceRequestsModel';
8
+ import type { ReimbursementRequests } from './ReimbursementRequestsModel';
9
+ import type { BankAccountChangeRequests } from './BankAccountChangeRequestsModel';
10
+ import type { FinancialChats } from './FinancialChatsModel';
11
+ import type { FinancialApprovals } from './FinancialApprovalsModel';
12
+ import type { FinancialWorkFlow } from './FinancialWorkFlowModel';
13
+ import type { FinancialAttachments } from './FinancialAttachmentsModel';
14
+ import type { RequestTypeMaster } from './RequestTypeMasterModel';
13
15
 
14
16
  export enum FinancialRequestStatus {
15
17
  DRAFT = "Draft",
@@ -69,34 +71,34 @@ export class FinancialRequests extends BaseModel {
69
71
  @Column({ type: 'int', nullable: true })
70
72
  current_approver_id: number;
71
73
 
72
- @OneToOne(() => PayslipRequests, payslip => payslip.financialRequest, { nullable: true })
74
+ @OneToOne('PayslipRequests', 'financialRequest', { nullable: true })
73
75
  payslipRequest?: PayslipRequests;
74
76
 
75
- @OneToOne(() => SalaryCertificateRequests, cert => cert.financial_request_id, { nullable: true })
77
+ @OneToOne('SalaryCertificateRequests', 'financialRequest', { nullable: true })
76
78
  salaryCertificateRequest?: SalaryCertificateRequests;
77
79
 
78
- @OneToOne(() => AllowanceRequests, allowance => allowance.financial_request_id, { nullable: true })
80
+ @OneToOne('AllowanceRequests', 'financialRequest', { nullable: true })
79
81
  allowanceRequest?: AllowanceRequests;
80
82
 
81
- @OneToOne(() => ReimbursementRequests, reimb => reimb.financial_request_id, { nullable: true })
83
+ @OneToOne('ReimbursementRequests', 'financialRequest', { nullable: true })
82
84
  reimbursementRequest?: ReimbursementRequests;
83
85
 
84
- @OneToOne(() => BankAccountChangeRequests, bank => bank.financial_request_id, { nullable: true })
86
+ @OneToOne('BankAccountChangeRequests', 'financialRequest', { nullable: true })
85
87
  bankAccountChangeRequest?: BankAccountChangeRequests;
86
88
 
87
- @OneToMany(() => FinancialChats, chat => chat.financialRequest)
89
+ @OneToMany('FinancialChats', 'financialRequest')
88
90
  chats?: FinancialChats[];
89
91
 
90
- @OneToMany(() => FinancialApprovals, approval => approval.financialRequest)
92
+ @OneToMany('FinancialApprovals', 'financialRequest')
91
93
  approvals?: FinancialApprovals[];
92
94
 
93
- @OneToMany(() => FinancialWorkFlow, workflow => workflow.financialRequest)
95
+ @OneToMany('FinancialWorkFlow', 'financialRequest')
94
96
  workflows?: FinancialWorkFlow[];
95
97
 
96
- @OneToMany(() => FinancialAttachments, attachment => attachment.financialRequest)
98
+ @OneToMany('FinancialAttachments', 'financialRequest')
97
99
  attachments?: FinancialAttachments[];
98
100
 
99
- @ManyToOne(() => RequestTypeMaster)
101
+ @ManyToOne('RequestTypeMaster')
100
102
  @JoinColumn({ name: 'request_type_id' })
101
103
  requestType?: RequestTypeMaster;
102
104