@platform-modules/foreign-ministry 1.0.30 → 1.0.31

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.
package/.env CHANGED
@@ -1,5 +1,5 @@
1
1
  DB_HOST=localhost
2
- DB_PORT=5433
3
- DB_USER=postgres
4
- DB_PASS=123
2
+ DB_PORT=5432
3
+ DB_USER=netflix_user
4
+ DB_PASS=netflix_user
5
5
  DB_NAME=FM
@@ -29,7 +29,8 @@ const questionTagsModel_1 = require("./models/questionTagsModel");
29
29
  const ConversationModel_1 = require("./models/ConversationModel");
30
30
  const ConversationParticipantModel_1 = require("./models/ConversationParticipantModel");
31
31
  const MessageModel_1 = require("./models/MessageModel");
32
- const serviceBookmarksModel_1 = require("./models/serviceBookmarksModel");
32
+ const FMServices_1 = require("./models/FMServices");
33
+ const FMSubservices_1 = require("./models/FMSubservices");
33
34
  exports.AppDataSource = new typeorm_1.DataSource({
34
35
  type: 'postgres',
35
36
  host: process.env.DB_HOST || 'localhost',
@@ -64,6 +65,7 @@ exports.AppDataSource = new typeorm_1.DataSource({
64
65
  ConversationModel_1.Conversation,
65
66
  ConversationParticipantModel_1.ConversationParticipant,
66
67
  MessageModel_1.Message,
67
- serviceBookmarksModel_1.ServiceBookmarks
68
+ FMServices_1.FMServices,
69
+ FMSubservices_1.FMSubServices
68
70
  ],
69
71
  });
package/dist/index.d.ts CHANGED
@@ -22,4 +22,5 @@ export * from './models/questionTagsModel';
22
22
  export * from './models/ConversationModel';
23
23
  export * from './models/ConversationParticipantModel';
24
24
  export * from './models/MessageModel';
25
- export * from './models/serviceBookmarksModel';
25
+ export * from './models/FMServices';
26
+ export * from './models/FMSubservices';
package/dist/index.js CHANGED
@@ -38,4 +38,5 @@ __exportStar(require("./models/questionTagsModel"), exports);
38
38
  __exportStar(require("./models/ConversationModel"), exports);
39
39
  __exportStar(require("./models/ConversationParticipantModel"), exports);
40
40
  __exportStar(require("./models/MessageModel"), exports);
41
- __exportStar(require("./models/serviceBookmarksModel"), exports);
41
+ __exportStar(require("./models/FMServices"), exports);
42
+ __exportStar(require("./models/FMSubservices"), exports);
@@ -0,0 +1,8 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class FMServices extends BaseModel {
3
+ code: string;
4
+ name: string;
5
+ description: string;
6
+ logo_url: string;
7
+ constructor(name: string, description: string, logo_url: string, code?: string);
8
+ }
@@ -0,0 +1,44 @@
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.FMServices = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let FMServices = class FMServices extends BaseModel_1.BaseModel {
16
+ constructor(name, description, logo_url, code) {
17
+ super();
18
+ this.name = name;
19
+ this.description = description;
20
+ this.logo_url = logo_url;
21
+ this.code = code || '';
22
+ }
23
+ };
24
+ exports.FMServices = FMServices;
25
+ __decorate([
26
+ (0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false, unique: true }),
27
+ __metadata("design:type", String)
28
+ ], FMServices.prototype, "code", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ nullable: false }),
31
+ __metadata("design:type", String)
32
+ ], FMServices.prototype, "name", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ nullable: false }),
35
+ __metadata("design:type", String)
36
+ ], FMServices.prototype, "description", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ nullable: false }),
39
+ __metadata("design:type", String)
40
+ ], FMServices.prototype, "logo_url", void 0);
41
+ exports.FMServices = FMServices = __decorate([
42
+ (0, typeorm_1.Entity)({ name: 'fm_services' }),
43
+ __metadata("design:paramtypes", [String, String, String, String])
44
+ ], FMServices);
@@ -0,0 +1,9 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class FMSubServices extends BaseModel {
3
+ code: string | null;
4
+ sub_service_name: string;
5
+ description: string;
6
+ service_id: number;
7
+ logo_url: string;
8
+ constructor(sub_service_name: string, description: string, service_id: number, logo_url: string, code?: string | null);
9
+ }
@@ -0,0 +1,49 @@
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.FMSubServices = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let FMSubServices = class FMSubServices extends BaseModel_1.BaseModel {
16
+ constructor(sub_service_name, description, service_id, logo_url, code = null) {
17
+ super();
18
+ this.sub_service_name = sub_service_name;
19
+ this.description = description;
20
+ this.service_id = service_id;
21
+ this.logo_url = logo_url;
22
+ this.code = code;
23
+ }
24
+ };
25
+ exports.FMSubServices = FMSubServices;
26
+ __decorate([
27
+ (0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: true, unique: true }),
28
+ __metadata("design:type", Object)
29
+ ], FMSubServices.prototype, "code", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Column)({ nullable: false }),
32
+ __metadata("design:type", String)
33
+ ], FMSubServices.prototype, "sub_service_name", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)({ nullable: false }),
36
+ __metadata("design:type", String)
37
+ ], FMSubServices.prototype, "description", void 0);
38
+ __decorate([
39
+ (0, typeorm_1.Column)({ nullable: true }),
40
+ __metadata("design:type", Number)
41
+ ], FMSubServices.prototype, "service_id", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Column)({ nullable: true }),
44
+ __metadata("design:type", String)
45
+ ], FMSubServices.prototype, "logo_url", void 0);
46
+ exports.FMSubServices = FMSubServices = __decorate([
47
+ (0, typeorm_1.Entity)({ name: 'fm_sub_services' }),
48
+ __metadata("design:paramtypes", [String, String, Number, String, Object])
49
+ ], FMSubServices);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -28,7 +28,8 @@ import { QuestionTags } from './models/questionTagsModel';
28
28
  import { Conversation } from './models/ConversationModel';
29
29
  import { ConversationParticipant } from './models/ConversationParticipantModel';
30
30
  import { Message } from './models/MessageModel';
31
- import { ServiceBookmarks } from './models/serviceBookmarksModel';
31
+ import { FMServices } from './models/FMServices';
32
+ import { FMSubServices } from './models/FMSubservices';
32
33
 
33
34
 
34
35
  export const AppDataSource = new DataSource({
@@ -65,6 +66,7 @@ export const AppDataSource = new DataSource({
65
66
  Conversation,
66
67
  ConversationParticipant,
67
68
  Message,
68
- ServiceBookmarks
69
+ FMServices,
70
+ FMSubServices
69
71
  ],
70
72
  });
package/src/index.ts CHANGED
@@ -22,4 +22,5 @@ export * from './models/questionTagsModel';
22
22
  export * from './models/ConversationModel';
23
23
  export * from './models/ConversationParticipantModel';
24
24
  export * from './models/MessageModel';
25
- export * from './models/serviceBookmarksModel';
25
+ export * from './models/FMServices';
26
+ export * from './models/FMSubservices';
@@ -0,0 +1,32 @@
1
+
2
+ import { Column, Entity } from "typeorm";
3
+ import { BaseModel } from './BaseModel';
4
+
5
+ @Entity({ name: 'fm_services' })
6
+ export class FMServices extends BaseModel {
7
+
8
+ @Column({ type: 'varchar', length: 64, nullable: false, unique: true })
9
+ code: string;
10
+
11
+ @Column({ nullable: false })
12
+ name: string;
13
+
14
+ @Column({ nullable: false })
15
+ description: string;
16
+
17
+ @Column({ nullable: false })
18
+ logo_url: string;
19
+
20
+ constructor(
21
+ name: string,
22
+ description: string,
23
+ logo_url: string,
24
+ code?: string
25
+ ) {
26
+ super();
27
+ this.name = name;
28
+ this.description = description;
29
+ this.logo_url = logo_url;
30
+ this.code = code || '';
31
+ }
32
+ }
@@ -0,0 +1,37 @@
1
+
2
+ import { Column, Entity } from "typeorm";
3
+ import { BaseModel } from './BaseModel';
4
+
5
+ @Entity({ name: 'fm_sub_services' })
6
+ export class FMSubServices extends BaseModel {
7
+
8
+ @Column({ type: 'varchar', length: 64, nullable: true, unique: true })
9
+ code: string | null;
10
+
11
+ @Column({ nullable: false })
12
+ sub_service_name: string;
13
+
14
+ @Column({ nullable: false })
15
+ description: string;
16
+
17
+ @Column({ nullable: true })
18
+ service_id: number;
19
+
20
+ @Column({ nullable: true })
21
+ logo_url: string;
22
+
23
+ constructor(
24
+ sub_service_name: string,
25
+ description: string,
26
+ service_id: number,
27
+ logo_url: string,
28
+ code: string | null = null
29
+ ) {
30
+ super();
31
+ this.sub_service_name = sub_service_name
32
+ this.description = description
33
+ this.service_id = service_id
34
+ this.logo_url = logo_url
35
+ this.code = code
36
+ }
37
+ }
@@ -1,6 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare class ServiceBookmarks extends BaseModel {
3
- user_id?: number;
4
- service_id?: number;
5
- constructor(user_id: number, service_id: number);
6
- }
@@ -1,34 +0,0 @@
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.ServiceBookmarks = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- let ServiceBookmarks = class ServiceBookmarks extends BaseModel_1.BaseModel {
16
- constructor(user_id, service_id) {
17
- super();
18
- this.user_id = user_id;
19
- this.service_id = service_id;
20
- }
21
- };
22
- exports.ServiceBookmarks = ServiceBookmarks;
23
- __decorate([
24
- (0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
25
- __metadata("design:type", Number)
26
- ], ServiceBookmarks.prototype, "user_id", void 0);
27
- __decorate([
28
- (0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
29
- __metadata("design:type", Number)
30
- ], ServiceBookmarks.prototype, "service_id", void 0);
31
- exports.ServiceBookmarks = ServiceBookmarks = __decorate([
32
- (0, typeorm_1.Entity)({ name: 'service_bookmarks' }),
33
- __metadata("design:paramtypes", [Number, Number])
34
- ], ServiceBookmarks);
@@ -1,21 +0,0 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from './BaseModel';
3
-
4
- @Entity({ name: 'service_bookmarks' })
5
- export class ServiceBookmarks extends BaseModel {
6
-
7
- @Column({ type: 'bigint', nullable: true })
8
- user_id?: number;
9
-
10
- @Column({ type: 'bigint', nullable: true })
11
- service_id?: number;
12
-
13
- constructor(
14
- user_id: number,
15
- service_id: number
16
- ) {
17
- super();
18
- this.user_id = user_id
19
- this.service_id = service_id
20
- }
21
- }