@platform-modules/foreign-ministry 1.3.363 → 1.3.364

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.
@@ -127,11 +127,11 @@ __decorate([
127
127
  __metadata("design:type", Object)
128
128
  ], GatePassRequests.prototype, "purpose_of_entry", void 0);
129
129
  __decorate([
130
- (0, typeorm_1.Column)({ type: 'date', nullable: true }),
130
+ (0, typeorm_1.Column)({ type: 'timestamptz', nullable: true }),
131
131
  __metadata("design:type", Object)
132
132
  ], GatePassRequests.prototype, "from_date", void 0);
133
133
  __decorate([
134
- (0, typeorm_1.Column)({ type: 'date', nullable: true }),
134
+ (0, typeorm_1.Column)({ type: 'timestamptz', nullable: true }),
135
135
  __metadata("design:type", Object)
136
136
  ], GatePassRequests.prototype, "to_date", void 0);
137
137
  __decorate([
@@ -119,11 +119,11 @@ __decorate([
119
119
  __metadata("design:type", Object)
120
120
  ], GatePassVisitors.prototype, "purpose_of_entry", void 0);
121
121
  __decorate([
122
- (0, typeorm_1.Column)({ type: 'date', nullable: true }),
122
+ (0, typeorm_1.Column)({ type: 'timestamptz', nullable: true }),
123
123
  __metadata("design:type", Object)
124
124
  ], GatePassVisitors.prototype, "from_date", void 0);
125
125
  __decorate([
126
- (0, typeorm_1.Column)({ type: 'date', nullable: true }),
126
+ (0, typeorm_1.Column)({ type: 'timestamptz', nullable: true }),
127
127
  __metadata("design:type", Object)
128
128
  ], GatePassVisitors.prototype, "to_date", void 0);
129
129
  __decorate([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.3.363",
3
+ "version": "1.3.364",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -0,0 +1,8 @@
1
+ -- Store gate pass validity window with date and time (not date-only).
2
+ ALTER TABLE gate_pass_requests
3
+ ALTER COLUMN from_date TYPE timestamptz USING from_date::timestamptz,
4
+ ALTER COLUMN to_date TYPE timestamptz USING to_date::timestamptz;
5
+
6
+ ALTER TABLE gate_pass_visitors
7
+ ALTER COLUMN from_date TYPE timestamptz USING from_date::timestamptz,
8
+ ALTER COLUMN to_date TYPE timestamptz USING to_date::timestamptz;
@@ -79,10 +79,10 @@ export class GatePassRequests extends BaseModel {
79
79
  @Column({ type: 'text', nullable: true })
80
80
  purpose_of_entry: string | null; // الغرض من الدخول (Purpose of Entry)
81
81
 
82
- @Column({ type: 'date', nullable: true })
82
+ @Column({ type: 'timestamptz', nullable: true })
83
83
  from_date: Date | null; // من (From)
84
84
 
85
- @Column({ type: 'date', nullable: true })
85
+ @Column({ type: 'timestamptz', nullable: true })
86
86
  to_date: Date | null; // الى (To)
87
87
 
88
88
  @Column({ type: 'enum', enum: GatePassType, nullable: true })
@@ -72,10 +72,10 @@ export class GatePassVisitors extends BaseModel {
72
72
  @Column({ type: 'text', nullable: true })
73
73
  purpose_of_entry: string | null; // الغرض من الدخول (Purpose of Entry)
74
74
 
75
- @Column({ type: 'date', nullable: true })
75
+ @Column({ type: 'timestamptz', nullable: true })
76
76
  from_date: Date | null; // من (From)
77
77
 
78
- @Column({ type: 'date', nullable: true })
78
+ @Column({ type: 'timestamptz', nullable: true })
79
79
  to_date: Date | null; // الى (To)
80
80
 
81
81
  // Store as varchar to avoid DB enum coupling (values: "Short-term" / "Long-term")