@aurispec/core-backend 1.0.31 → 1.0.33
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/dist/common/enums/UploadEnum.d.ts +8 -7
- package/dist/common/enums/UploadEnum.d.ts.map +1 -1
- package/dist/common/enums/UploadEnum.js +8 -7
- package/dist/common/enums/index.d.ts +2 -0
- package/dist/common/enums/index.d.ts.map +1 -1
- package/dist/common/enums/index.js +2 -0
- package/dist/database/migrations/1775138300445-modified_articles_table.d.ts +7 -0
- package/dist/database/migrations/1775138300445-modified_articles_table.d.ts.map +1 -0
- package/dist/database/migrations/1775138300445-modified_articles_table.js +15 -0
- package/dist/database/migrations/1775153966683-modified_articles_table.d.ts +7 -0
- package/dist/database/migrations/1775153966683-modified_articles_table.d.ts.map +1 -0
- package/dist/database/migrations/1775153966683-modified_articles_table.js +13 -0
- package/dist/database/migrations/1775330936726-modified_categories_enums_table.d.ts +7 -0
- package/dist/database/migrations/1775330936726-modified_categories_enums_table.d.ts.map +1 -0
- package/dist/database/migrations/1775330936726-modified_categories_enums_table.js +39 -0
- package/dist/database/migrations/1775346015390-modified_articles_table.d.ts +7 -0
- package/dist/database/migrations/1775346015390-modified_articles_table.d.ts.map +1 -0
- package/dist/database/migrations/1775346015390-modified_articles_table.js +17 -0
- package/dist/models/AdminUserModel.d.ts +2 -0
- package/dist/models/AdminUserModel.d.ts.map +1 -1
- package/dist/models/AdminUserModel.js +9 -0
- package/dist/models/ArticleModel.d.ts +7 -0
- package/dist/models/ArticleModel.d.ts.map +1 -1
- package/dist/models/ArticleModel.js +30 -1
- package/dist/models/UserModel.d.ts +2 -0
- package/dist/models/UserModel.d.ts.map +1 -1
- package/dist/models/UserModel.js +9 -0
- package/package.json +1 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
export declare enum UploadDirectories {
|
|
2
2
|
EVENTS = "events/cover-images",
|
|
3
3
|
USERS = "users/avatars",
|
|
4
|
-
COMMUNITY_COVER_IMAGES = "
|
|
5
|
-
COMMUNITY_PROFILE_IMAGES = "
|
|
6
|
-
COMMUNITY_POST_IMAGES = "
|
|
7
|
-
ARTICLE_IMAGES = "
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
COMMUNITY_COVER_IMAGES = "communities/cover-images",
|
|
5
|
+
COMMUNITY_PROFILE_IMAGES = "communities/profile-images",
|
|
6
|
+
COMMUNITY_POST_IMAGES = "communities/post-images",
|
|
7
|
+
ARTICLE_IMAGES = "article-images",
|
|
8
|
+
OUTLOOK_IMAGES = "outlook-images",
|
|
9
|
+
PRODUCT_IMAGES = "marketplace/product-images",
|
|
10
|
+
SERVICE_PROVIDERS_IMAGES = "marketplace/service-providers-images",
|
|
11
|
+
BUSINESS_IMAGES = "marketplace/business-id-images"
|
|
11
12
|
}
|
|
12
13
|
export declare enum FILE_HOST_PROVIDER {
|
|
13
14
|
CLOUDINARY = "CLOUDINARY"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploadEnum.d.ts","sourceRoot":"","sources":["../../../src/common/enums/UploadEnum.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B,MAAM,wBAAwB;IAC9B,KAAK,kBAAkB;IACvB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"UploadEnum.d.ts","sourceRoot":"","sources":["../../../src/common/enums/UploadEnum.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B,MAAM,wBAAwB;IAC9B,KAAK,kBAAkB;IACvB,sBAAsB,6BAA6B;IACnD,wBAAwB,+BAA+B;IACvD,qBAAqB,4BAA4B;IACjD,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,cAAc,+BAA+B;IAC7C,wBAAwB,yCAAyC;IACjE,eAAe,mCAAmC;CACnD;AAED,oBAAY,kBAAkB;IAC1B,UAAU,eAAe;CAC5B"}
|
|
@@ -5,13 +5,14 @@ var UploadDirectories;
|
|
|
5
5
|
(function (UploadDirectories) {
|
|
6
6
|
UploadDirectories["EVENTS"] = "events/cover-images";
|
|
7
7
|
UploadDirectories["USERS"] = "users/avatars";
|
|
8
|
-
UploadDirectories["COMMUNITY_COVER_IMAGES"] = "
|
|
9
|
-
UploadDirectories["COMMUNITY_PROFILE_IMAGES"] = "
|
|
10
|
-
UploadDirectories["COMMUNITY_POST_IMAGES"] = "
|
|
11
|
-
UploadDirectories["ARTICLE_IMAGES"] = "
|
|
12
|
-
UploadDirectories["
|
|
13
|
-
UploadDirectories["
|
|
14
|
-
UploadDirectories["
|
|
8
|
+
UploadDirectories["COMMUNITY_COVER_IMAGES"] = "communities/cover-images";
|
|
9
|
+
UploadDirectories["COMMUNITY_PROFILE_IMAGES"] = "communities/profile-images";
|
|
10
|
+
UploadDirectories["COMMUNITY_POST_IMAGES"] = "communities/post-images";
|
|
11
|
+
UploadDirectories["ARTICLE_IMAGES"] = "article-images";
|
|
12
|
+
UploadDirectories["OUTLOOK_IMAGES"] = "outlook-images";
|
|
13
|
+
UploadDirectories["PRODUCT_IMAGES"] = "marketplace/product-images";
|
|
14
|
+
UploadDirectories["SERVICE_PROVIDERS_IMAGES"] = "marketplace/service-providers-images";
|
|
15
|
+
UploadDirectories["BUSINESS_IMAGES"] = "marketplace/business-id-images";
|
|
15
16
|
})(UploadDirectories || (exports.UploadDirectories = UploadDirectories = {}));
|
|
16
17
|
var FILE_HOST_PROVIDER;
|
|
17
18
|
(function (FILE_HOST_PROVIDER) {
|
|
@@ -15,6 +15,8 @@ export declare enum SYS_MODELS {
|
|
|
15
15
|
CONNECTION_MODEL = "ConnectionModel",
|
|
16
16
|
EVENT_MODEL = "EventModel",
|
|
17
17
|
BUSINESS_MODEL = "BusinessModel",
|
|
18
|
+
CATEGORY_MODEL = "CategoryModel",
|
|
19
|
+
OUTLOOK_MODEL = "OutlookModel",
|
|
18
20
|
PRODUCT_MODEL = "ProductModel",
|
|
19
21
|
CHAT_MESSAGE_MODEL = "ChatMessageModel",
|
|
20
22
|
SERVICE_PROVIDER_MODEL = "ServiceProviderModel"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/enums/index.ts"],"names":[],"mappings":"AAAC,oBAAY,MAAM;IACf,MAAM,WAAW;IACjB,QAAQ,aAAa;CACxB;AAED,oBAAY,mBAAmB;IAC3B,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,KAAK,UAAU;CAClB;AAED,oBAAY,UAAU;IAClB,UAAU,cAAc;IACxB,aAAa,iBAAiB;IAC9B,kBAAkB,iBAAiB;IACnC,qBAAqB,wBAAwB;IAC7C,gBAAgB,oBAAoB;IACpC,WAAW,eAAe;IAC1B,cAAc,kBAAkB;IAChC,aAAa,iBAAiB;IAC9B,kBAAkB,qBAAqB;IACvC,sBAAsB,yBAAyB;CAClD;AAEA,oBAAY,YAAY;IACrB,iBAAiB,sBAAsB;CAC1C;AAED,oBAAY,UAAU;IACpB,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB;AAED,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,oBAAY,wBAAwB;IAChC,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,QAAQ,aAAa;CACxB;AAED,oBAAY,iBAAiB;IACzB,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,MAAM,WAAW;CACpB;AAED,oBAAY,aAAa;IACvB,WAAW,QAAQ;IACnB,cAAc,SAAS;IACvB,iBAAiB,UAAU;IAC3B,mBAAmB,UAAU;IAC7B,UAAU,YAAY;CACvB;AAED,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/enums/index.ts"],"names":[],"mappings":"AAAC,oBAAY,MAAM;IACf,MAAM,WAAW;IACjB,QAAQ,aAAa;CACxB;AAED,oBAAY,mBAAmB;IAC3B,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,KAAK,UAAU;CAClB;AAED,oBAAY,UAAU;IAClB,UAAU,cAAc;IACxB,aAAa,iBAAiB;IAC9B,kBAAkB,iBAAiB;IACnC,qBAAqB,wBAAwB;IAC7C,gBAAgB,oBAAoB;IACpC,WAAW,eAAe;IAC1B,cAAc,kBAAkB;IAChC,cAAc,kBAAkB;IAChC,aAAa,iBAAiB;IAC9B,aAAa,iBAAiB;IAC9B,kBAAkB,qBAAqB;IACvC,sBAAsB,yBAAyB;CAClD;AAEA,oBAAY,YAAY;IACrB,iBAAiB,sBAAsB;CAC1C;AAED,oBAAY,UAAU;IACpB,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB;AAED,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,oBAAY,wBAAwB;IAChC,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,QAAQ,aAAa;CACxB;AAED,oBAAY,iBAAiB;IACzB,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,MAAM,WAAW;CACpB;AAED,oBAAY,aAAa;IACvB,WAAW,QAAQ;IACnB,cAAc,SAAS;IACvB,iBAAiB,UAAU;IAC3B,mBAAmB,UAAU;IAC7B,UAAU,YAAY;CACvB;AAED,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA"}
|
|
@@ -35,6 +35,8 @@ var SYS_MODELS;
|
|
|
35
35
|
SYS_MODELS["CONNECTION_MODEL"] = "ConnectionModel";
|
|
36
36
|
SYS_MODELS["EVENT_MODEL"] = "EventModel";
|
|
37
37
|
SYS_MODELS["BUSINESS_MODEL"] = "BusinessModel";
|
|
38
|
+
SYS_MODELS["CATEGORY_MODEL"] = "CategoryModel";
|
|
39
|
+
SYS_MODELS["OUTLOOK_MODEL"] = "OutlookModel";
|
|
38
40
|
SYS_MODELS["PRODUCT_MODEL"] = "ProductModel";
|
|
39
41
|
SYS_MODELS["CHAT_MESSAGE_MODEL"] = "ChatMessageModel";
|
|
40
42
|
SYS_MODELS["SERVICE_PROVIDER_MODEL"] = "ServiceProviderModel";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class ModifiedArticlesTable1775138300445 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1775138300445-modified_articles_table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1775138300445-modified_articles_table.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1775138300445-modified_articles_table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,kCAAmC,YAAW,kBAAkB;IACzE,IAAI,SAAuC;IAE9B,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.ModifiedArticlesTable1775138300445 = void 0;
|
|
4
|
+
class ModifiedArticlesTable1775138300445 {
|
|
5
|
+
name = 'ModifiedArticlesTable1775138300445';
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TYPE "public"."articles_status_enum" AS ENUM('ACTIVE', 'PENDING', 'BANNED')`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "articles" ADD "status" "public"."articles_status_enum" NOT NULL DEFAULT 'PENDING'`);
|
|
9
|
+
}
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "articles" DROP COLUMN "status"`);
|
|
12
|
+
await queryRunner.query(`DROP TYPE "public"."articles_status_enum"`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.ModifiedArticlesTable1775138300445 = ModifiedArticlesTable1775138300445;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class ModifiedArticlesTable1775153966683 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1775153966683-modified_articles_table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1775153966683-modified_articles_table.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1775153966683-modified_articles_table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,kCAAmC,YAAW,kBAAkB;IACzE,IAAI,SAAuC;IAE9B,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAI7D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModifiedArticlesTable1775153966683 = void 0;
|
|
4
|
+
class ModifiedArticlesTable1775153966683 {
|
|
5
|
+
name = 'ModifiedArticlesTable1775153966683';
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "articles" ADD CONSTRAINT "FK_87bb15395540ae06337a486a77a" FOREIGN KEY ("user_id") REFERENCES "admin_users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
8
|
+
}
|
|
9
|
+
async down(queryRunner) {
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "articles" DROP CONSTRAINT "FK_87bb15395540ae06337a486a77a"`);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.ModifiedArticlesTable1775153966683 = ModifiedArticlesTable1775153966683;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class ModifiedCategoriesEnumsTable1775330936726 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1775330936726-modified_categories_enums_table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1775330936726-modified_categories_enums_table.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1775330936726-modified_categories_enums_table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,yCAA0C,YAAW,kBAAkB;IAChF,IAAI,SAA8C;IAErC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAiB3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAiB7D"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModifiedCategoriesEnumsTable1775330936726 = void 0;
|
|
4
|
+
class ModifiedCategoriesEnumsTable1775330936726 {
|
|
5
|
+
name = 'ModifiedCategoriesEnumsTable1775330936726';
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "articles" ADD "admin_id" integer`);
|
|
8
|
+
await queryRunner.query(`ALTER TYPE "public"."market_listing_categories_type_enum" RENAME TO "market_listing_categories_type_enum_old"`);
|
|
9
|
+
await queryRunner.query(`CREATE TYPE "public"."market_listing_categories_type_enum" AS ENUM('PostModel', 'ArticleModel', 'CommentModel', 'ArticleCommentModel', 'ConnectionModel', 'EventModel', 'BusinessModel', 'CategoryModel', 'OutlookModel', 'ProductModel', 'ChatMessageModel', 'ServiceProviderModel')`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "market_listing_categories" ALTER COLUMN "type" DROP DEFAULT`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "market_listing_categories" ALTER COLUMN "type" TYPE "public"."market_listing_categories_type_enum" USING "type"::"text"::"public"."market_listing_categories_type_enum"`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "market_listing_categories" ALTER COLUMN "type" SET DEFAULT 'ProductModel'`);
|
|
13
|
+
await queryRunner.query(`DROP TYPE "public"."market_listing_categories_type_enum_old"`);
|
|
14
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_6bc030c54a48f96fd543b56a35"`);
|
|
15
|
+
await queryRunner.query(`ALTER TYPE "public"."bookmarks_bookmarkable_type_enum" RENAME TO "bookmarks_bookmarkable_type_enum_old"`);
|
|
16
|
+
await queryRunner.query(`CREATE TYPE "public"."bookmarks_bookmarkable_type_enum" AS ENUM('PostModel', 'ArticleModel', 'CommentModel', 'ArticleCommentModel', 'ConnectionModel', 'EventModel', 'BusinessModel', 'CategoryModel', 'OutlookModel', 'ProductModel', 'ChatMessageModel', 'ServiceProviderModel')`);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE "bookmarks" ALTER COLUMN "bookmarkable_type" TYPE "public"."bookmarks_bookmarkable_type_enum" USING "bookmarkable_type"::"text"::"public"."bookmarks_bookmarkable_type_enum"`);
|
|
18
|
+
await queryRunner.query(`DROP TYPE "public"."bookmarks_bookmarkable_type_enum_old"`);
|
|
19
|
+
await queryRunner.query(`CREATE INDEX "IDX_6bc030c54a48f96fd543b56a35" ON "bookmarks" ("bookmarkable_id", "user_id", "bookmarkable_type") `);
|
|
20
|
+
await queryRunner.query(`ALTER TABLE "articles" ADD CONSTRAINT "FK_8fb6ceb1e15c9320c4f576b07c7" FOREIGN KEY ("admin_id") REFERENCES "admin_users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
21
|
+
}
|
|
22
|
+
async down(queryRunner) {
|
|
23
|
+
await queryRunner.query(`ALTER TABLE "articles" DROP CONSTRAINT "FK_8fb6ceb1e15c9320c4f576b07c7"`);
|
|
24
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_6bc030c54a48f96fd543b56a35"`);
|
|
25
|
+
await queryRunner.query(`CREATE TYPE "public"."bookmarks_bookmarkable_type_enum_old" AS ENUM('PostModel', 'ArticleModel', 'CommentModel', 'ArticleCommentModel', 'ConnectionModel', 'EventModel', 'BusinessModel', 'ProductModel', 'ChatMessageModel', 'ServiceProviderModel')`);
|
|
26
|
+
await queryRunner.query(`ALTER TABLE "bookmarks" ALTER COLUMN "bookmarkable_type" TYPE "public"."bookmarks_bookmarkable_type_enum_old" USING "bookmarkable_type"::"text"::"public"."bookmarks_bookmarkable_type_enum_old"`);
|
|
27
|
+
await queryRunner.query(`DROP TYPE "public"."bookmarks_bookmarkable_type_enum"`);
|
|
28
|
+
await queryRunner.query(`ALTER TYPE "public"."bookmarks_bookmarkable_type_enum_old" RENAME TO "bookmarks_bookmarkable_type_enum"`);
|
|
29
|
+
await queryRunner.query(`CREATE INDEX "IDX_6bc030c54a48f96fd543b56a35" ON "bookmarks" ("user_id", "bookmarkable_id", "bookmarkable_type") `);
|
|
30
|
+
await queryRunner.query(`CREATE TYPE "public"."market_listing_categories_type_enum_old" AS ENUM('PostModel', 'ArticleModel', 'CommentModel', 'ArticleCommentModel', 'ConnectionModel', 'EventModel', 'BusinessModel', 'ProductModel', 'ChatMessageModel', 'ServiceProviderModel')`);
|
|
31
|
+
await queryRunner.query(`ALTER TABLE "market_listing_categories" ALTER COLUMN "type" DROP DEFAULT`);
|
|
32
|
+
await queryRunner.query(`ALTER TABLE "market_listing_categories" ALTER COLUMN "type" TYPE "public"."market_listing_categories_type_enum_old" USING "type"::"text"::"public"."market_listing_categories_type_enum_old"`);
|
|
33
|
+
await queryRunner.query(`ALTER TABLE "market_listing_categories" ALTER COLUMN "type" SET DEFAULT 'ProductModel'`);
|
|
34
|
+
await queryRunner.query(`DROP TYPE "public"."market_listing_categories_type_enum"`);
|
|
35
|
+
await queryRunner.query(`ALTER TYPE "public"."market_listing_categories_type_enum_old" RENAME TO "market_listing_categories_type_enum"`);
|
|
36
|
+
await queryRunner.query(`ALTER TABLE "articles" DROP COLUMN "admin_id"`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.ModifiedCategoriesEnumsTable1775330936726 = ModifiedCategoriesEnumsTable1775330936726;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class ModifiedArticlesTable1775346015390 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1775346015390-modified_articles_table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1775346015390-modified_articles_table.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1775346015390-modified_articles_table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,kCAAmC,YAAW,kBAAkB;IACzE,IAAI,SAAuC;IAE9B,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.ModifiedArticlesTable1775346015390 = void 0;
|
|
4
|
+
class ModifiedArticlesTable1775346015390 {
|
|
5
|
+
name = 'ModifiedArticlesTable1775346015390';
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "articles" ADD "category_id" integer`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "articles" ADD "external_link" character varying(50)`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "articles" ADD CONSTRAINT "FK_e025eeefcdb2a269c42484ee43f" FOREIGN KEY ("category_id") REFERENCES "market_listing_categories"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
10
|
+
}
|
|
11
|
+
async down(queryRunner) {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "articles" DROP CONSTRAINT "FK_e025eeefcdb2a269c42484ee43f"`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "articles" DROP COLUMN "external_link"`);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "articles" DROP COLUMN "category_id"`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.ModifiedArticlesTable1775346015390 = ModifiedArticlesTable1775346015390;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseModel } from "./BaseModel";
|
|
2
2
|
import { UserRoles } from "../common/enums/UserEnums";
|
|
3
3
|
import { STATUS } from "../common/enums";
|
|
4
|
+
import { ArticleModel } from "./ArticleModel";
|
|
4
5
|
export declare class AdminUserModel extends BaseModel {
|
|
5
6
|
email: string;
|
|
6
7
|
first_name: string;
|
|
@@ -14,5 +15,6 @@ export declare class AdminUserModel extends BaseModel {
|
|
|
14
15
|
reset_token_expires_at?: Date | null;
|
|
15
16
|
status: STATUS;
|
|
16
17
|
role: UserRoles;
|
|
18
|
+
articles?: ArticleModel[];
|
|
17
19
|
}
|
|
18
20
|
//# sourceMappingURL=AdminUserModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminUserModel.d.ts","sourceRoot":"","sources":["../../src/models/AdminUserModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"AdminUserModel.d.ts","sourceRoot":"","sources":["../../src/models/AdminUserModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,qBAEa,cAAe,SAAQ,SAAS;IAE3C,KAAK,EAAG,MAAM,CAAC;IAGf,UAAU,EAAG,MAAM,CAAC;IAGpB,SAAS,EAAG,MAAM,CAAC;IAGnB,aAAa,EAAG,MAAM,CAAC;IAGvB,UAAU,CAAC,EAAE,IAAI,CAAC;IAGlB,WAAW,EAAG,OAAO,CAAC;IAGtB,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGnC,uBAAuB,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGtC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAG5B,sBAAsB,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAOrC,MAAM,EAAG,MAAM,CAAC;IAOhB,IAAI,EAAG,SAAS,CAAC;IAUjB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC3B"}
|
|
@@ -15,6 +15,7 @@ const BaseModel_1 = require("./BaseModel");
|
|
|
15
15
|
const UserEnums_1 = require("../common/enums/UserEnums");
|
|
16
16
|
const enums_1 = require("../common/enums");
|
|
17
17
|
const typedi_1 = require("typedi");
|
|
18
|
+
const ArticleModel_1 = require("./ArticleModel");
|
|
18
19
|
let AdminUserModel = class AdminUserModel extends BaseModel_1.BaseModel {
|
|
19
20
|
email;
|
|
20
21
|
first_name;
|
|
@@ -28,6 +29,7 @@ let AdminUserModel = class AdminUserModel extends BaseModel_1.BaseModel {
|
|
|
28
29
|
reset_token_expires_at;
|
|
29
30
|
status;
|
|
30
31
|
role;
|
|
32
|
+
articles;
|
|
31
33
|
};
|
|
32
34
|
exports.AdminUserModel = AdminUserModel;
|
|
33
35
|
__decorate([
|
|
@@ -86,6 +88,13 @@ __decorate([
|
|
|
86
88
|
}),
|
|
87
89
|
__metadata("design:type", String)
|
|
88
90
|
], AdminUserModel.prototype, "role", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, typeorm_1.OneToMany)(() => ArticleModel_1.ArticleModel, (articles) => articles.admin, {
|
|
93
|
+
onDelete: "SET NULL",
|
|
94
|
+
onUpdate: "CASCADE",
|
|
95
|
+
}),
|
|
96
|
+
__metadata("design:type", Array)
|
|
97
|
+
], AdminUserModel.prototype, "articles", void 0);
|
|
89
98
|
exports.AdminUserModel = AdminUserModel = __decorate([
|
|
90
99
|
(0, typedi_1.Service)(),
|
|
91
100
|
(0, typeorm_1.Entity)({ name: "admin_users" })
|
|
@@ -3,16 +3,23 @@ import { UserModel } from "./UserModel";
|
|
|
3
3
|
import { ArticleContentType, ArticleStatus, ArticleVisibility } from "../common/enums/ArticleEnum";
|
|
4
4
|
import { PostImageModel } from "./PostImageModel";
|
|
5
5
|
import { CommentModel } from "./CommentModel";
|
|
6
|
+
import { AdminUserModel } from "./AdminUserModel";
|
|
7
|
+
import { CategoryModel } from "./CategoryModel";
|
|
6
8
|
export declare class ArticleModel extends BaseModel {
|
|
7
9
|
user_id: number;
|
|
10
|
+
admin_id?: number;
|
|
11
|
+
category_id?: number;
|
|
8
12
|
is_sensitive?: boolean;
|
|
9
13
|
visibility: ArticleVisibility;
|
|
10
14
|
content_type: ArticleContentType;
|
|
11
15
|
status: ArticleStatus;
|
|
12
16
|
title?: string | null;
|
|
17
|
+
external_link?: string | null;
|
|
13
18
|
description: string;
|
|
14
19
|
user: UserModel;
|
|
20
|
+
admin: AdminUserModel;
|
|
15
21
|
images?: PostImageModel[];
|
|
16
22
|
comments?: CommentModel[];
|
|
23
|
+
category: CategoryModel;
|
|
17
24
|
}
|
|
18
25
|
//# sourceMappingURL=ArticleModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleModel.d.ts","sourceRoot":"","sources":["../../src/models/ArticleModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACnG,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAQ,EAAC,YAAY,EAAC,MAAO,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"ArticleModel.d.ts","sourceRoot":"","sources":["../../src/models/ArticleModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACnG,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAQ,EAAC,YAAY,EAAC,MAAO,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAEa,YAAa,SAAQ,SAAS;IAEzC,OAAO,EAAG,MAAM,CAAC;IAGjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,YAAY,CAAC,EAAE,OAAO,CAAC;IAOvB,UAAU,EAAG,iBAAiB,CAAC;IAO/B,YAAY,EAAG,kBAAkB,CAAC;IAOlC,MAAM,EAAG,aAAa,CAAC;IAGvB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGtB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAG9B,WAAW,EAAG,MAAM,CAAC;IAIrB,IAAI,EAAG,SAAS,CAAC;IAIjB,KAAK,EAAG,cAAc,CAAC;IAGvB,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;IAG1B,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAI1B,QAAQ,EAAG,aAAa,CAAC;CAC1B"}
|
|
@@ -16,23 +16,38 @@ const UserModel_1 = require("./UserModel");
|
|
|
16
16
|
const ArticleEnum_1 = require("../common/enums/ArticleEnum");
|
|
17
17
|
const PostImageModel_1 = require("./PostImageModel");
|
|
18
18
|
const CommentModel_1 = require("./CommentModel");
|
|
19
|
+
const AdminUserModel_1 = require("./AdminUserModel");
|
|
20
|
+
const CategoryModel_1 = require("./CategoryModel");
|
|
19
21
|
let ArticleModel = class ArticleModel extends BaseModel_1.BaseModel {
|
|
20
22
|
user_id;
|
|
23
|
+
admin_id;
|
|
24
|
+
category_id;
|
|
21
25
|
is_sensitive;
|
|
22
26
|
visibility;
|
|
23
27
|
content_type;
|
|
24
28
|
status;
|
|
25
29
|
title;
|
|
30
|
+
external_link;
|
|
26
31
|
description;
|
|
27
32
|
user;
|
|
33
|
+
admin;
|
|
28
34
|
images;
|
|
29
35
|
comments;
|
|
36
|
+
category;
|
|
30
37
|
};
|
|
31
38
|
exports.ArticleModel = ArticleModel;
|
|
32
39
|
__decorate([
|
|
33
40
|
(0, typeorm_1.Column)(),
|
|
34
41
|
__metadata("design:type", Number)
|
|
35
42
|
], ArticleModel.prototype, "user_id", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], ArticleModel.prototype, "admin_id", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], ArticleModel.prototype, "category_id", void 0);
|
|
36
51
|
__decorate([
|
|
37
52
|
(0, typeorm_1.Column)({ default: false, nullable: true }),
|
|
38
53
|
__metadata("design:type", Boolean)
|
|
@@ -65,15 +80,24 @@ __decorate([
|
|
|
65
80
|
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
66
81
|
__metadata("design:type", Object)
|
|
67
82
|
], ArticleModel.prototype, "title", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
85
|
+
__metadata("design:type", Object)
|
|
86
|
+
], ArticleModel.prototype, "external_link", void 0);
|
|
68
87
|
__decorate([
|
|
69
88
|
(0, typeorm_1.Column)({ type: "text" }),
|
|
70
89
|
__metadata("design:type", String)
|
|
71
90
|
], ArticleModel.prototype, "description", void 0);
|
|
72
91
|
__decorate([
|
|
73
|
-
(0, typeorm_1.ManyToOne)(() => UserModel_1.UserModel, (user) => user.
|
|
92
|
+
(0, typeorm_1.ManyToOne)(() => UserModel_1.UserModel, (user) => user.articles),
|
|
74
93
|
(0, typeorm_1.JoinColumn)({ name: "user_id", referencedColumnName: "id" }),
|
|
75
94
|
__metadata("design:type", UserModel_1.UserModel)
|
|
76
95
|
], ArticleModel.prototype, "user", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, typeorm_1.ManyToOne)(() => AdminUserModel_1.AdminUserModel, (admin) => admin.articles),
|
|
98
|
+
(0, typeorm_1.JoinColumn)({ name: "admin_id", referencedColumnName: "id" }),
|
|
99
|
+
__metadata("design:type", AdminUserModel_1.AdminUserModel)
|
|
100
|
+
], ArticleModel.prototype, "admin", void 0);
|
|
77
101
|
__decorate([
|
|
78
102
|
(0, typeorm_1.OneToMany)(() => PostImageModel_1.PostImageModel, (images) => images.post),
|
|
79
103
|
__metadata("design:type", Array)
|
|
@@ -82,6 +106,11 @@ __decorate([
|
|
|
82
106
|
(0, typeorm_1.OneToMany)(() => CommentModel_1.CommentModel, (comments) => comments.post),
|
|
83
107
|
__metadata("design:type", Array)
|
|
84
108
|
], ArticleModel.prototype, "comments", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, typeorm_1.ManyToOne)(() => CategoryModel_1.CategoryModel),
|
|
111
|
+
(0, typeorm_1.JoinColumn)({ name: "category_id", referencedColumnName: "id" }),
|
|
112
|
+
__metadata("design:type", CategoryModel_1.CategoryModel)
|
|
113
|
+
], ArticleModel.prototype, "category", void 0);
|
|
85
114
|
exports.ArticleModel = ArticleModel = __decorate([
|
|
86
115
|
(0, typeorm_1.Entity)({ name: "articles" }),
|
|
87
116
|
(0, typeorm_1.Index)(["is_sensitive", "user_id", "visibility"])
|
|
@@ -13,6 +13,7 @@ import { ConnectionModel } from "./ConnectionModel";
|
|
|
13
13
|
import { ReviewModel } from "./ReviewModel";
|
|
14
14
|
import { SubscriptionHistoryModel } from "./SubscriptionHistoryModel";
|
|
15
15
|
import { BusinessModel } from "./BusinessModel";
|
|
16
|
+
import { ArticleModel } from "./ArticleModel";
|
|
16
17
|
export declare class UserModel extends BaseModel {
|
|
17
18
|
full_name: string;
|
|
18
19
|
terms_and_conditions: boolean;
|
|
@@ -37,6 +38,7 @@ export declare class UserModel extends BaseModel {
|
|
|
37
38
|
transactions?: TransactionModel[];
|
|
38
39
|
user_profile?: UserProfileModel | null;
|
|
39
40
|
events?: EventModel[];
|
|
41
|
+
articles?: ArticleModel[];
|
|
40
42
|
cards?: CardModel[];
|
|
41
43
|
communities?: CommunityModel[];
|
|
42
44
|
comment?: CommentModel[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserModel.d.ts","sourceRoot":"","sources":["../../src/models/UserModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC3F,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"UserModel.d.ts","sourceRoot":"","sources":["../../src/models/UserModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC3F,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,qBAEa,SAAU,SAAQ,SAAS;IAEpC,SAAS,EAAG,MAAM,CAAC;IAGnB,oBAAoB,EAAG,OAAO,CAAC;IAG/B,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGnC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGjC,uBAAuB,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGtC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAG5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAG1B,sBAAsB,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGrC,KAAK,EAAG,MAAM,CAAC;IAGf,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,aAAa,CAAC,EAAE,MAAM,CAAC;IAGvB,WAAW,EAAG,OAAO,CAAC;IAGtB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,SAAS,CAAC,EAAE,OAAO,CAAC;IAGpB,SAAS,CAAC,EAAE,IAAI,CAAC;IAOjB,WAAW,EAAG,aAAa,CAAC;IAO5B,aAAa,EAAG,YAAY,CAAC;IAO7B,eAAe,EAAG,iBAAiB,CAAC;IAOpC,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAUxB,oBAAoB,CAAC,EAAE,wBAAwB,EAAE,CAAC;IAUlD,YAAY,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAMlC,YAAY,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAUvC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC;IAUtB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAQ1B,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IAQpB,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;IAS/B,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IAQzB,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IAQpB,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAQzC,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IAQrC,oBAAoB,CAAC,EAAE,eAAe,EAAE,CAAC;IAQzC,cAAc,CAAC,EAAE,WAAW,EAAE,CAAC;IAQ/B,UAAU,CAAC,EAAE,aAAa,EAAE,CAAC;CAChC"}
|
package/dist/models/UserModel.js
CHANGED
|
@@ -26,6 +26,7 @@ const ConnectionModel_1 = require("./ConnectionModel");
|
|
|
26
26
|
const ReviewModel_1 = require("./ReviewModel");
|
|
27
27
|
const SubscriptionHistoryModel_1 = require("./SubscriptionHistoryModel");
|
|
28
28
|
const BusinessModel_1 = require("./BusinessModel");
|
|
29
|
+
const ArticleModel_1 = require("./ArticleModel");
|
|
29
30
|
let UserModel = class UserModel extends BaseModel_1.BaseModel {
|
|
30
31
|
full_name;
|
|
31
32
|
terms_and_conditions;
|
|
@@ -50,6 +51,7 @@ let UserModel = class UserModel extends BaseModel_1.BaseModel {
|
|
|
50
51
|
transactions;
|
|
51
52
|
user_profile;
|
|
52
53
|
events;
|
|
54
|
+
articles;
|
|
53
55
|
cards;
|
|
54
56
|
communities;
|
|
55
57
|
comment;
|
|
@@ -181,6 +183,13 @@ __decorate([
|
|
|
181
183
|
}),
|
|
182
184
|
__metadata("design:type", Array)
|
|
183
185
|
], UserModel.prototype, "events", void 0);
|
|
186
|
+
__decorate([
|
|
187
|
+
(0, typeorm_1.OneToMany)(() => ArticleModel_1.ArticleModel, (articles) => articles.user, {
|
|
188
|
+
onDelete: "SET NULL",
|
|
189
|
+
onUpdate: "CASCADE",
|
|
190
|
+
}),
|
|
191
|
+
__metadata("design:type", Array)
|
|
192
|
+
], UserModel.prototype, "articles", void 0);
|
|
184
193
|
__decorate([
|
|
185
194
|
(0, typeorm_1.OneToMany)(() => CardModel_1.CardModel, (cards) => cards.user, {
|
|
186
195
|
onDelete: "SET NULL",
|