@aurispec/core-backend 1.0.5 → 1.0.6

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 ModifiedCategoriesTable1773052871526 implements MigrationInterface {
3
+ name: string;
4
+ up(queryRunner: QueryRunner): Promise<void>;
5
+ down(queryRunner: QueryRunner): Promise<void>;
6
+ }
7
+ //# sourceMappingURL=1773052871526-modified_categories_table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1773052871526-modified_categories_table.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1773052871526-modified_categories_table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,oCAAqC,YAAW,kBAAkB;IAC3E,IAAI,SAAyC;IAEhC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAO3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAO7D"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ModifiedCategoriesTable1773052871526 = void 0;
4
+ class ModifiedCategoriesTable1773052871526 {
5
+ name = 'ModifiedCategoriesTable1773052871526';
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`DROP INDEX "public"."IDX_728447781a30bc3fcfe5c2f1cd"`);
8
+ await queryRunner.query(`CREATE TYPE "public"."market_listing_categories_type_enum" AS ENUM('PostModel', 'ArticleModel', 'CommentModel', 'ArticleCommentModel', 'ConnectionModel', 'EventModel', 'BusinessModel', 'ProductModel', 'ChatMessageModel', 'ServiceProviderModel')`);
9
+ await queryRunner.query(`ALTER TABLE "market_listing_categories" ADD "type" "public"."market_listing_categories_type_enum" NOT NULL DEFAULT 'ProductModel'`);
10
+ await queryRunner.query(`CREATE INDEX "IDX_822c80c52e3d265bdd538c5e14" ON "reviews" ("user_id", "business_id") `);
11
+ }
12
+ async down(queryRunner) {
13
+ await queryRunner.query(`DROP INDEX "public"."IDX_822c80c52e3d265bdd538c5e14"`);
14
+ await queryRunner.query(`ALTER TABLE "market_listing_categories" DROP COLUMN "type"`);
15
+ await queryRunner.query(`DROP TYPE "public"."market_listing_categories_type_enum"`);
16
+ await queryRunner.query(`CREATE INDEX "IDX_728447781a30bc3fcfe5c2f1cd" ON "reviews" ("user_id") `);
17
+ }
18
+ }
19
+ exports.ModifiedCategoriesTable1773052871526 = ModifiedCategoriesTable1773052871526;
@@ -1,5 +1,7 @@
1
1
  import { BaseModel } from "./BaseModel";
2
+ import { SYS_MODELS } from "../common/enums";
2
3
  export declare class CategoryModel extends BaseModel {
3
4
  name: string;
5
+ type: SYS_MODELS;
4
6
  }
5
7
  //# sourceMappingURL=CategoryModel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CategoryModel.d.ts","sourceRoot":"","sources":["../../src/models/CategoryModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBACa,aAAc,SAAQ,SAAS;IAE1C,IAAI,EAAG,MAAM,CAAC;CACf"}
1
+ {"version":3,"file":"CategoryModel.d.ts","sourceRoot":"","sources":["../../src/models/CategoryModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,qBACa,aAAc,SAAQ,SAAS;IAE1C,IAAI,EAAG,MAAM,CAAC;IAOd,IAAI,EAAG,UAAU,CAAC;CACnB"}
@@ -12,14 +12,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CategoryModel = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
+ const enums_1 = require("../common/enums");
15
16
  let CategoryModel = class CategoryModel extends BaseModel_1.BaseModel {
16
17
  name;
18
+ type;
17
19
  };
18
20
  exports.CategoryModel = CategoryModel;
19
21
  __decorate([
20
22
  (0, typeorm_1.Column)(),
21
23
  __metadata("design:type", String)
22
24
  ], CategoryModel.prototype, "name", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)({
27
+ type: "enum",
28
+ enum: enums_1.SYS_MODELS,
29
+ default: enums_1.SYS_MODELS.PRODUCT_MODEL
30
+ }),
31
+ __metadata("design:type", String)
32
+ ], CategoryModel.prototype, "type", void 0);
23
33
  exports.CategoryModel = CategoryModel = __decorate([
24
34
  (0, typeorm_1.Entity)({ name: "market_listing_categories" })
25
35
  ], CategoryModel);
@@ -51,5 +51,5 @@ __decorate([
51
51
  ], ReviewModel.prototype, "business", void 0);
52
52
  exports.ReviewModel = ReviewModel = __decorate([
53
53
  (0, typeorm_1.Entity)({ name: "reviews" }),
54
- (0, typeorm_1.Index)(["user_id"])
54
+ (0, typeorm_1.Index)(["user_id", "business_id"])
55
55
  ], ReviewModel);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurispec/core-backend",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Auri spectrum's backend core",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",