@platform-modules/foreign-ministry 1.0.106 → 1.0.108

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.
@@ -80,7 +80,7 @@ exports.AppDataSource = new typeorm_1.DataSource({
80
80
  username: process.env.DB_USER || 'postgres',
81
81
  password: process.env.DB_PASS || 'postgres',
82
82
  database: process.env.DB_NAME || 'common_models',
83
- synchronize: true, // auto-create tables (disable in prod)
83
+ synchronize: false, // auto-create tables (disable in prod)
84
84
  logging: false,
85
85
  entities: [
86
86
  user_1.User,
@@ -8,6 +8,6 @@ export declare class BankAccountChangeRequests extends BaseModel {
8
8
  new_account_name: string;
9
9
  new_branch_ifsc_code: string;
10
10
  reason_for_change: string;
11
- effective_from_date: Date;
12
- constructor(financial_request_id: number, new_bank_name: string, new_account_number: string, new_account_name: string, new_branch_ifsc_code: string, reason_for_change: string, effective_from_date: Date);
11
+ effective_from_date: string;
12
+ constructor(financial_request_id: number, new_bank_name: string, new_account_number: string, new_account_name: string, new_branch_ifsc_code: string, reason_for_change: string, effective_from_date: string);
13
13
  }
@@ -58,10 +58,10 @@ __decorate([
58
58
  __metadata("design:type", String)
59
59
  ], BankAccountChangeRequests.prototype, "reason_for_change", void 0);
60
60
  __decorate([
61
- (0, typeorm_1.Column)({ type: 'boolean', default: false }),
62
- __metadata("design:type", Date)
61
+ (0, typeorm_1.Column)({ type: 'date', default: false }),
62
+ __metadata("design:type", String)
63
63
  ], BankAccountChangeRequests.prototype, "effective_from_date", void 0);
64
64
  exports.BankAccountChangeRequests = BankAccountChangeRequests = __decorate([
65
65
  (0, typeorm_1.Entity)({ name: 'bank_account_change_requests' }),
66
- __metadata("design:paramtypes", [Number, String, String, String, String, String, Date])
66
+ __metadata("design:paramtypes", [Number, String, String, String, String, String, String])
67
67
  ], BankAccountChangeRequests);
@@ -1,11 +1,13 @@
1
1
  import { BaseModel } from './BaseModel';
2
2
  export declare class Holidays extends BaseModel {
3
3
  title: string;
4
- holiday_date: Date;
4
+ holiday_from_date: Date;
5
+ holiday_to_date: Date;
5
6
  description?: string;
6
7
  region?: string;
7
8
  is_optional: boolean;
8
9
  holiday_type: string;
9
10
  year?: number;
10
- constructor(title: string, holiday_date: Date, description?: string, region?: string, is_optional?: boolean, holiday_type?: string, year?: number);
11
+ notification_days?: number;
12
+ constructor(title: string, holiday_from_date: Date, holiday_to_date: Date, holiday_type?: string, year?: number, notification_days?: number);
11
13
  }
@@ -13,15 +13,14 @@ exports.Holidays = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
15
  let Holidays = class Holidays extends BaseModel_1.BaseModel {
16
- constructor(title, holiday_date, description, region, is_optional = false, holiday_type = 'Public', year) {
16
+ constructor(title, holiday_from_date, holiday_to_date, holiday_type = 'Public', year, notification_days) {
17
17
  super();
18
18
  this.title = title;
19
- this.holiday_date = holiday_date;
20
- this.description = description;
21
- this.region = region;
22
- this.is_optional = is_optional;
19
+ this.holiday_from_date = holiday_from_date;
20
+ this.holiday_to_date = holiday_to_date;
23
21
  this.holiday_type = holiday_type;
24
22
  this.year = year;
23
+ this.notification_days = notification_days;
25
24
  }
26
25
  };
27
26
  exports.Holidays = Holidays;
@@ -30,9 +29,13 @@ __decorate([
30
29
  __metadata("design:type", String)
31
30
  ], Holidays.prototype, "title", void 0);
32
31
  __decorate([
33
- (0, typeorm_1.Column)({ type: 'date', name: 'holiday_date' }),
32
+ (0, typeorm_1.Column)({ type: 'date', name: 'holiday_from_date' }),
34
33
  __metadata("design:type", Date)
35
- ], Holidays.prototype, "holiday_date", void 0);
34
+ ], Holidays.prototype, "holiday_from_date", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.Column)({ type: 'date', name: 'holiday_to_date' }),
37
+ __metadata("design:type", Date)
38
+ ], Holidays.prototype, "holiday_to_date", void 0);
36
39
  __decorate([
37
40
  (0, typeorm_1.Column)({ type: 'text', nullable: true }),
38
41
  __metadata("design:type", String)
@@ -53,7 +56,12 @@ __decorate([
53
56
  (0, typeorm_1.Column)({ type: 'int', nullable: true }),
54
57
  __metadata("design:type", Number)
55
58
  ], Holidays.prototype, "year", void 0);
59
+ __decorate([
60
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
61
+ __metadata("design:type", Number)
62
+ ], Holidays.prototype, "notification_days", void 0);
56
63
  exports.Holidays = Holidays = __decorate([
57
64
  (0, typeorm_1.Entity)({ name: 'holidays' }),
58
- __metadata("design:paramtypes", [String, Date, String, String, Boolean, String, Number])
65
+ __metadata("design:paramtypes", [String, Date,
66
+ Date, String, Number, Number])
59
67
  ], Holidays);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.0.106",
3
+ "version": "1.0.108",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -86,7 +86,7 @@ export const AppDataSource = new DataSource({
86
86
  username: process.env.DB_USER || 'postgres',
87
87
  password: process.env.DB_PASS || 'postgres',
88
88
  database: process.env.DB_NAME || 'common_models',
89
- synchronize: true, // auto-create tables (disable in prod)
89
+ synchronize: false, // auto-create tables (disable in prod)
90
90
  logging: false,
91
91
  entities: [
92
92
  User,
@@ -30,8 +30,8 @@ export class BankAccountChangeRequests extends BaseModel {
30
30
  @Column({ type: 'text' })
31
31
  reason_for_change: string;
32
32
 
33
- @Column({ type: 'boolean', default: false })
34
- effective_from_date: Date;
33
+ @Column({ type: 'date', default: false })
34
+ effective_from_date: string;
35
35
 
36
36
  constructor(
37
37
  financial_request_id: number,
@@ -40,7 +40,7 @@ export class BankAccountChangeRequests extends BaseModel {
40
40
  new_account_name: string,
41
41
  new_branch_ifsc_code: string,
42
42
  reason_for_change: string,
43
- effective_from_date: Date,
43
+ effective_from_date: string,
44
44
  ) {
45
45
  super();
46
46
  this.financial_request_id = financial_request_id;
@@ -7,8 +7,11 @@ export class Holidays extends BaseModel {
7
7
  @Column({ type: 'varchar', length: 200 })
8
8
  title: string;
9
9
 
10
- @Column({ type: 'date', name: 'holiday_date' })
11
- holiday_date: Date;
10
+ @Column({ type: 'date', name: 'holiday_from_date' })
11
+ holiday_from_date: Date;
12
+
13
+ @Column({ type: 'date', name: 'holiday_to_date' })
14
+ holiday_to_date: Date;
12
15
 
13
16
  @Column({ type: 'text', nullable: true })
14
17
  description?: string;
@@ -25,22 +28,23 @@ export class Holidays extends BaseModel {
25
28
  @Column({ type: 'int', nullable: true })
26
29
  year?: number;
27
30
 
31
+ @Column({ type: 'int', nullable: true })
32
+ notification_days?: number;
33
+
28
34
  constructor(
29
35
  title: string,
30
- holiday_date: Date,
31
- description?: string,
32
- region?: string,
33
- is_optional: boolean = false,
36
+ holiday_from_date: Date,
37
+ holiday_to_date: Date,
34
38
  holiday_type: string = 'Public',
35
- year?: number
39
+ year?: number,
40
+ notification_days?: number
36
41
  ) {
37
42
  super();
38
43
  this.title = title;
39
- this.holiday_date = holiday_date;
40
- this.description = description;
41
- this.region = region;
42
- this.is_optional = is_optional;
44
+ this.holiday_from_date = holiday_from_date;
45
+ this.holiday_to_date = holiday_to_date;
43
46
  this.holiday_type = holiday_type;
44
47
  this.year = year;
48
+ this.notification_days = notification_days;
45
49
  }
46
50
  }