@platform-modules/foreign-ministry 1.1.27 → 1.1.29

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,9 +1,16 @@
1
1
  import { BaseModel } from './BaseModel';
2
2
  import { FinancialRequests } from './FinancialRequestsModel';
3
+ export declare enum statusEnum {
4
+ PENDING = "Pending",
5
+ APPROVED = "Approved",
6
+ REJECTED = "Rejected"
7
+ }
3
8
  export declare class FinancialChats extends BaseModel {
4
9
  financial_request_id: number;
5
10
  content: string;
6
11
  sender_user_id: number;
12
+ role_id: number | null;
13
+ status: statusEnum | null;
7
14
  financialRequest?: FinancialRequests;
8
15
  constructor(financial_request_id: number, content: string, sender_user_id: number);
9
16
  }
@@ -9,10 +9,16 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.FinancialChats = void 0;
12
+ exports.FinancialChats = exports.statusEnum = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
15
  const FinancialRequestsModel_1 = require("./FinancialRequestsModel");
16
+ var statusEnum;
17
+ (function (statusEnum) {
18
+ statusEnum["PENDING"] = "Pending";
19
+ statusEnum["APPROVED"] = "Approved";
20
+ statusEnum["REJECTED"] = "Rejected";
21
+ })(statusEnum || (exports.statusEnum = statusEnum = {}));
16
22
  let FinancialChats = class FinancialChats extends BaseModel_1.BaseModel {
17
23
  constructor(financial_request_id, content, sender_user_id) {
18
24
  super();
@@ -34,6 +40,14 @@ __decorate([
34
40
  (0, typeorm_1.Column)({ type: 'int' }),
35
41
  __metadata("design:type", Number)
36
42
  ], FinancialChats.prototype, "sender_user_id", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
45
+ __metadata("design:type", Object)
46
+ ], FinancialChats.prototype, "role_id", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
49
+ __metadata("design:type", Object)
50
+ ], FinancialChats.prototype, "status", void 0);
37
51
  __decorate([
38
52
  (0, typeorm_1.ManyToOne)(() => FinancialRequestsModel_1.FinancialRequests, fr => fr.chats),
39
53
  (0, typeorm_1.JoinColumn)({ name: 'financial_request_id' }),
@@ -11,6 +11,7 @@ export declare class ReimbursementRequests extends BaseModel {
11
11
  payment_processed: boolean;
12
12
  payment_mode: string;
13
13
  payment_date: Date;
14
+ currency: string;
14
15
  financialRequest?: FinancialRequests;
15
16
  constructor(financial_request_id: number, amount: number, quantity: number, total_amount: number, approved_amount: number, payment_mode: string, payment_date: Date, expense_description: string);
16
17
  }
@@ -68,6 +68,10 @@ __decorate([
68
68
  (0, typeorm_1.Column)({ type: 'date', nullable: true }),
69
69
  __metadata("design:type", Date)
70
70
  ], ReimbursementRequests.prototype, "payment_date", void 0);
71
+ __decorate([
72
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: false }),
73
+ __metadata("design:type", String)
74
+ ], ReimbursementRequests.prototype, "currency", void 0);
71
75
  __decorate([
72
76
  (0, typeorm_1.ManyToOne)(() => FinancialRequestsModel_1.FinancialRequests, fr => fr.reimbursementRequests),
73
77
  (0, typeorm_1.JoinColumn)({ name: 'financial_request_id' }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.1.27",
3
+ "version": "1.1.29",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -2,6 +2,12 @@ import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
2
2
  import { BaseModel } from './BaseModel';
3
3
  import { FinancialRequests } from './FinancialRequestsModel';
4
4
 
5
+ export enum statusEnum {
6
+ PENDING = "Pending",
7
+ APPROVED = "Approved",
8
+ REJECTED = "Rejected"
9
+ }
10
+
5
11
  @Entity({ name: 'financial_chats' })
6
12
  export class FinancialChats extends BaseModel {
7
13
  @Column({ type: 'int' })
@@ -13,6 +19,12 @@ export class FinancialChats extends BaseModel {
13
19
  @Column({ type: 'int' })
14
20
  sender_user_id: number;
15
21
 
22
+ @Column({ type: 'int', nullable: true })
23
+ role_id: number | null;
24
+
25
+ @Column({ type: 'varchar', length: 255, nullable: true })
26
+ status: statusEnum | null;
27
+
16
28
  @ManyToOne(() => FinancialRequests, fr => fr.chats)
17
29
  @JoinColumn({ name: 'financial_request_id' })
18
30
  financialRequest?: FinancialRequests;
@@ -34,6 +34,9 @@ export class ReimbursementRequests extends BaseModel {
34
34
  @Column({ type: 'date', nullable: true })
35
35
  payment_date: Date;
36
36
 
37
+ @Column({ type: 'varchar', nullable: false })
38
+ currency : string;
39
+
37
40
  @ManyToOne(() => FinancialRequests, fr => fr.reimbursementRequests)
38
41
  @JoinColumn({ name: 'financial_request_id' })
39
42
  financialRequest?: FinancialRequests;