@platform-modules/foreign-ministry 1.1.100 → 1.1.101

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.
@@ -118,6 +118,8 @@ const UserPersonalDetailsModel_1 = require("./models/UserPersonalDetailsModel");
118
118
  const UserEmploymentDetailsModel_1 = require("./models/UserEmploymentDetailsModel");
119
119
  const UserEducationDetailsModel_1 = require("./models/UserEducationDetailsModel");
120
120
  const DiplomaticTitlesMasterModel_1 = require("./models/DiplomaticTitlesMasterModel");
121
+ const CountryMasterModel_1 = require("./models/CountryMasterModel");
122
+ const NationalityMasterModel_1 = require("./models/NationalityMasterModel");
121
123
  exports.AppDataSource = new typeorm_1.DataSource({
122
124
  type: 'postgres',
123
125
  host: process.env.DB_HOST || 'localhost',
@@ -240,6 +242,8 @@ exports.AppDataSource = new typeorm_1.DataSource({
240
242
  UserPersonalDetailsModel_1.UserPersonalDetails,
241
243
  UserEmploymentDetailsModel_1.UserEmploymentDetails,
242
244
  UserEducationDetailsModel_1.UserEducationDetails,
243
- DiplomaticTitlesMasterModel_1.DiplomaticTitlesMaster
245
+ DiplomaticTitlesMasterModel_1.DiplomaticTitlesMaster,
246
+ CountryMasterModel_1.CountryMaster,
247
+ NationalityMasterModel_1.NationalityMaster
244
248
  ],
245
249
  });
package/dist/index.d.ts CHANGED
@@ -127,3 +127,5 @@ export * from './models/UserEmploymentDetailsModel';
127
127
  export * from './models/UserEducationDetailsModel';
128
128
  export { ProfileUpdateRequestStatus } from './models/ProfileUpdateRequestsModel';
129
129
  export * from './models/DiplomaticTitlesMasterModel';
130
+ export * from './models/CountryMasterModel';
131
+ export * from './models/NationalityMasterModel';
package/dist/index.js CHANGED
@@ -158,3 +158,5 @@ __exportStar(require("./models/UserEducationDetailsModel"), exports);
158
158
  var ProfileUpdateRequestsModel_1 = require("./models/ProfileUpdateRequestsModel");
159
159
  Object.defineProperty(exports, "ProfileUpdateRequestStatus", { enumerable: true, get: function () { return ProfileUpdateRequestsModel_1.ProfileUpdateRequestStatus; } });
160
160
  __exportStar(require("./models/DiplomaticTitlesMasterModel"), exports);
161
+ __exportStar(require("./models/CountryMasterModel"), exports);
162
+ __exportStar(require("./models/NationalityMasterModel"), exports);
@@ -0,0 +1,11 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class CountryMaster extends BaseModel {
3
+ country_name: string;
4
+ country_name_arabic: string | null;
5
+ country_code: string | null;
6
+ phone_code: string | null;
7
+ description: string | null;
8
+ is_active: boolean;
9
+ display_order: number;
10
+ constructor(country_name: string);
11
+ }
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CountryMaster = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let CountryMaster = class CountryMaster extends BaseModel_1.BaseModel {
16
+ constructor(country_name) {
17
+ super();
18
+ this.country_name = country_name;
19
+ this.is_active = true;
20
+ this.display_order = 0;
21
+ }
22
+ };
23
+ exports.CountryMaster = CountryMaster;
24
+ __decorate([
25
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
26
+ __metadata("design:type", String)
27
+ ], CountryMaster.prototype, "country_name", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
30
+ __metadata("design:type", Object)
31
+ ], CountryMaster.prototype, "country_name_arabic", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ type: 'varchar', length: 10, nullable: true }),
34
+ __metadata("design:type", Object)
35
+ ], CountryMaster.prototype, "country_code", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)({ type: 'varchar', length: 10, nullable: true }),
38
+ __metadata("design:type", Object)
39
+ ], CountryMaster.prototype, "phone_code", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
42
+ __metadata("design:type", Object)
43
+ ], CountryMaster.prototype, "description", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ type: 'boolean', default: true }),
46
+ __metadata("design:type", Boolean)
47
+ ], CountryMaster.prototype, "is_active", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({ type: 'int', default: 0 }),
50
+ __metadata("design:type", Number)
51
+ ], CountryMaster.prototype, "display_order", void 0);
52
+ exports.CountryMaster = CountryMaster = __decorate([
53
+ (0, typeorm_1.Entity)({ name: 'country_master' }),
54
+ __metadata("design:paramtypes", [String])
55
+ ], CountryMaster);
@@ -0,0 +1,10 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class NationalityMaster extends BaseModel {
3
+ nationality_name: string;
4
+ nationality_name_arabic: string | null;
5
+ country_code: string | null;
6
+ description: string | null;
7
+ is_active: boolean;
8
+ display_order: number;
9
+ constructor(nationality_name: string);
10
+ }
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.NationalityMaster = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let NationalityMaster = class NationalityMaster extends BaseModel_1.BaseModel {
16
+ constructor(nationality_name) {
17
+ super();
18
+ this.nationality_name = nationality_name;
19
+ this.is_active = true;
20
+ this.display_order = 0;
21
+ }
22
+ };
23
+ exports.NationalityMaster = NationalityMaster;
24
+ __decorate([
25
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
26
+ __metadata("design:type", String)
27
+ ], NationalityMaster.prototype, "nationality_name", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
30
+ __metadata("design:type", Object)
31
+ ], NationalityMaster.prototype, "nationality_name_arabic", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ type: 'varchar', length: 10, nullable: true }),
34
+ __metadata("design:type", Object)
35
+ ], NationalityMaster.prototype, "country_code", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
38
+ __metadata("design:type", Object)
39
+ ], NationalityMaster.prototype, "description", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ type: 'boolean', default: true }),
42
+ __metadata("design:type", Boolean)
43
+ ], NationalityMaster.prototype, "is_active", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ type: 'int', default: 0 }),
46
+ __metadata("design:type", Number)
47
+ ], NationalityMaster.prototype, "display_order", void 0);
48
+ exports.NationalityMaster = NationalityMaster = __decorate([
49
+ (0, typeorm_1.Entity)({ name: 'nationality_master' }),
50
+ __metadata("design:paramtypes", [String])
51
+ ], NationalityMaster);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.1.100",
3
+ "version": "1.1.101",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -123,6 +123,8 @@ import { UserPersonalDetails } from './models/UserPersonalDetailsModel'
123
123
  import { UserEmploymentDetails } from './models/UserEmploymentDetailsModel'
124
124
  import { UserEducationDetails } from './models/UserEducationDetailsModel'
125
125
  import { DiplomaticTitlesMaster } from './models/DiplomaticTitlesMasterModel'
126
+ import { CountryMaster } from './models/CountryMasterModel'
127
+ import { NationalityMaster } from './models/NationalityMasterModel'
126
128
 
127
129
 
128
130
  export const AppDataSource = new DataSource({
@@ -247,6 +249,8 @@ export const AppDataSource = new DataSource({
247
249
  UserPersonalDetails,
248
250
  UserEmploymentDetails,
249
251
  UserEducationDetails,
250
- DiplomaticTitlesMaster
252
+ DiplomaticTitlesMaster,
253
+ CountryMaster,
254
+ NationalityMaster
251
255
  ],
252
256
  });
package/src/index.ts CHANGED
@@ -127,3 +127,5 @@ export * from './models/UserEmploymentDetailsModel';
127
127
  export * from './models/UserEducationDetailsModel';
128
128
  export { ProfileUpdateRequestStatus } from './models/ProfileUpdateRequestsModel';
129
129
  export * from './models/DiplomaticTitlesMasterModel';
130
+ export * from './models/CountryMasterModel';
131
+ export * from './models/NationalityMasterModel';
@@ -0,0 +1,34 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ @Entity({ name: 'country_master' })
5
+ export class CountryMaster extends BaseModel {
6
+ @Column({ type: 'varchar', length: 255, nullable: false })
7
+ country_name: string; // Country name
8
+
9
+ @Column({ type: 'varchar', length: 255, nullable: true })
10
+ country_name_arabic: string | null; // Arabic translation
11
+
12
+ @Column({ type: 'varchar', length: 10, nullable: true })
13
+ country_code: string | null; // ISO country code (e.g., "OM", "US")
14
+
15
+ @Column({ type: 'varchar', length: 10, nullable: true })
16
+ phone_code: string | null; // Phone country code (e.g., "+968")
17
+
18
+ @Column({ type: 'text', nullable: true })
19
+ description: string | null; // Description of the country
20
+
21
+ @Column({ type: 'boolean', default: true })
22
+ is_active: boolean; // Whether the country is active
23
+
24
+ @Column({ type: 'int', default: 0 })
25
+ display_order: number; // Order for display in dropdowns
26
+
27
+ constructor(country_name: string) {
28
+ super();
29
+ this.country_name = country_name;
30
+ this.is_active = true;
31
+ this.display_order = 0;
32
+ }
33
+ }
34
+
@@ -0,0 +1,31 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ @Entity({ name: 'nationality_master' })
5
+ export class NationalityMaster extends BaseModel {
6
+ @Column({ type: 'varchar', length: 255, nullable: false })
7
+ nationality_name: string; // Nationality name
8
+
9
+ @Column({ type: 'varchar', length: 255, nullable: true })
10
+ nationality_name_arabic: string | null; // Arabic translation
11
+
12
+ @Column({ type: 'varchar', length: 10, nullable: true })
13
+ country_code: string | null; // Associated country code
14
+
15
+ @Column({ type: 'text', nullable: true })
16
+ description: string | null; // Description of the nationality
17
+
18
+ @Column({ type: 'boolean', default: true })
19
+ is_active: boolean; // Whether the nationality is active
20
+
21
+ @Column({ type: 'int', default: 0 })
22
+ display_order: number; // Order for display in dropdowns
23
+
24
+ constructor(nationality_name: string) {
25
+ super();
26
+ this.nationality_name = nationality_name;
27
+ this.is_active = true;
28
+ this.display_order = 0;
29
+ }
30
+ }
31
+