@aurispec/core-backend 1.0.39 → 1.0.40

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.
@@ -0,0 +1,7 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+ export declare class ModifiedSettingsAndConfigsTable1775599466002 implements MigrationInterface {
3
+ name: string;
4
+ up(queryRunner: QueryRunner): Promise<void>;
5
+ down(queryRunner: QueryRunner): Promise<void>;
6
+ }
7
+ //# sourceMappingURL=1775599466002-modified_settings_and_configs_table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1775599466002-modified_settings_and_configs_table.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1775599466002-modified_settings_and_configs_table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,4CAA6C,YAAW,kBAAkB;IACnF,IAAI,SAAiD;IAExC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAM3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAM7D"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ModifiedSettingsAndConfigsTable1775599466002 = void 0;
4
+ class ModifiedSettingsAndConfigsTable1775599466002 {
5
+ name = 'ModifiedSettingsAndConfigsTable1775599466002';
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`CREATE TABLE "word_blacklists" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_at" TIMESTAMP DEFAULT now(), "deleted_at" TIMESTAMP, "admin_id" integer NOT NULL, "name" character varying NOT NULL, CONSTRAINT "UQ_57bbc7df70901b78a166c9091d2" UNIQUE ("uuid"), CONSTRAINT "PK_99f5b8d63adc487bef7c1d42e5f" PRIMARY KEY ("id"))`);
8
+ await queryRunner.query(`CREATE INDEX "IDX_57bbc7df70901b78a166c9091d" ON "word_blacklists" ("uuid") `);
9
+ await queryRunner.query(`ALTER TABLE "word_blacklists" ADD CONSTRAINT "FK_6a0d5ba69d4b1afd01898342d02" FOREIGN KEY ("admin_id") REFERENCES "admin_users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
10
+ }
11
+ async down(queryRunner) {
12
+ await queryRunner.query(`ALTER TABLE "word_blacklists" DROP CONSTRAINT "FK_6a0d5ba69d4b1afd01898342d02"`);
13
+ await queryRunner.query(`DROP INDEX "public"."IDX_57bbc7df70901b78a166c9091d"`);
14
+ await queryRunner.query(`DROP TABLE "word_blacklists"`);
15
+ }
16
+ }
17
+ exports.ModifiedSettingsAndConfigsTable1775599466002 = ModifiedSettingsAndConfigsTable1775599466002;
@@ -0,0 +1,7 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+ export declare class ModifiedSettingsAndConfigsTable1775633979435 implements MigrationInterface {
3
+ name: string;
4
+ up(queryRunner: QueryRunner): Promise<void>;
5
+ down(queryRunner: QueryRunner): Promise<void>;
6
+ }
7
+ //# sourceMappingURL=1775633979435-modified_settings_and_configs_table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1775633979435-modified_settings_and_configs_table.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1775633979435-modified_settings_and_configs_table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,4CAA6C,YAAW,kBAAkB;IACnF,IAAI,SAAiD;IAExC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAK3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAK7D"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ModifiedSettingsAndConfigsTable1775633979435 = void 0;
4
+ class ModifiedSettingsAndConfigsTable1775633979435 {
5
+ name = 'ModifiedSettingsAndConfigsTable1775633979435';
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "topics" ADD "admin_id" integer`);
8
+ await queryRunner.query(`ALTER TABLE "topics" ADD CONSTRAINT "FK_a6a232c0172f4e80a8b20659bfb" FOREIGN KEY ("admin_id") REFERENCES "admin_users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
9
+ }
10
+ async down(queryRunner) {
11
+ await queryRunner.query(`ALTER TABLE "topics" DROP CONSTRAINT "FK_a6a232c0172f4e80a8b20659bfb"`);
12
+ await queryRunner.query(`ALTER TABLE "topics" DROP COLUMN "admin_id"`);
13
+ }
14
+ }
15
+ exports.ModifiedSettingsAndConfigsTable1775633979435 = ModifiedSettingsAndConfigsTable1775633979435;
@@ -1,7 +1,10 @@
1
1
  import { BaseModel } from "./BaseModel";
2
2
  import { CommunityTopicModel } from "./CommunityTopicModel";
3
+ import { AdminUserModel } from "./AdminUserModel";
3
4
  export declare class TopicModel extends BaseModel {
4
5
  name: string;
6
+ admin_id?: number;
5
7
  topics?: CommunityTopicModel[];
8
+ admin: AdminUserModel;
6
9
  }
7
10
  //# sourceMappingURL=TopicModel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TopicModel.d.ts","sourceRoot":"","sources":["../../src/models/TopicModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,qBACa,UAAW,SAAQ,SAAS;IAEvC,IAAI,EAAG,MAAM,CAAC;IAGd,MAAM,CAAC,EAAE,mBAAmB,EAAE,CAAA;CAC/B"}
1
+ {"version":3,"file":"TopicModel.d.ts","sourceRoot":"","sources":["../../src/models/TopicModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBACa,UAAW,SAAQ,SAAS;IAEvC,IAAI,EAAG,MAAM,CAAC;IAGd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,MAAM,CAAC,EAAE,mBAAmB,EAAE,CAAA;IAI9B,KAAK,EAAG,cAAc,CAAC;CACxB"}
@@ -13,19 +13,31 @@ exports.TopicModel = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
15
  const CommunityTopicModel_1 = require("./CommunityTopicModel");
16
+ const AdminUserModel_1 = require("./AdminUserModel");
16
17
  let TopicModel = class TopicModel extends BaseModel_1.BaseModel {
17
18
  name;
19
+ admin_id;
18
20
  topics;
21
+ admin;
19
22
  };
20
23
  exports.TopicModel = TopicModel;
21
24
  __decorate([
22
25
  (0, typeorm_1.Column)(),
23
26
  __metadata("design:type", String)
24
27
  ], TopicModel.prototype, "name", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({ nullable: true }),
30
+ __metadata("design:type", Number)
31
+ ], TopicModel.prototype, "admin_id", void 0);
25
32
  __decorate([
26
33
  (0, typeorm_1.OneToMany)(() => CommunityTopicModel_1.CommunityTopicModel, (topic) => topic.community_topic),
27
34
  __metadata("design:type", Array)
28
35
  ], TopicModel.prototype, "topics", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.ManyToOne)(() => AdminUserModel_1.AdminUserModel),
38
+ (0, typeorm_1.JoinColumn)({ name: 'admin_id' }),
39
+ __metadata("design:type", AdminUserModel_1.AdminUserModel)
40
+ ], TopicModel.prototype, "admin", void 0);
29
41
  exports.TopicModel = TopicModel = __decorate([
30
42
  (0, typeorm_1.Entity)({ name: "topics" })
31
43
  ], TopicModel);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurispec/core-backend",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "description": "Auri spectrum's backend core",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",