@aurispec/core-backend 1.0.27 → 1.0.29
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/ArticleEnum.d.ts +11 -0
- package/dist/common/enums/ArticleEnum.d.ts.map +1 -0
- package/dist/common/enums/ArticleEnum.js +15 -0
- package/dist/database/migrations/1774771856055-modified_user_profile_steps_table.d.ts +7 -0
- package/dist/database/migrations/1774771856055-modified_user_profile_steps_table.d.ts.map +1 -0
- package/dist/database/migrations/1774771856055-modified_user_profile_steps_table.js +21 -0
- package/dist/database/migrations/1774773950819-modified_user_profile_steps_table.d.ts +7 -0
- package/dist/database/migrations/1774773950819-modified_user_profile_steps_table.d.ts.map +1 -0
- package/dist/database/migrations/1774773950819-modified_user_profile_steps_table.js +15 -0
- package/dist/database/migrations/1774775712183-modified_user_profile_steps_table.d.ts +7 -0
- package/dist/database/migrations/1774775712183-modified_user_profile_steps_table.d.ts.map +1 -0
- package/dist/database/migrations/1774775712183-modified_user_profile_steps_table.js +23 -0
- package/dist/database/migrations/1775127269923-modified_articles_table.d.ts +7 -0
- package/dist/database/migrations/1775127269923-modified_articles_table.d.ts.map +1 -0
- package/dist/database/migrations/1775127269923-modified_articles_table.js +31 -0
- package/dist/models/ArticleModel.d.ts +3 -2
- package/dist/models/ArticleModel.d.ts.map +1 -1
- package/dist/models/ArticleModel.js +12 -3
- package/dist/models/ConnectionBlacklistModel.d.ts +0 -3
- package/dist/models/ConnectionBlacklistModel.d.ts.map +1 -1
- package/dist/models/ConnectionBlacklistModel.js +0 -14
- package/dist/models/UserProfileStepModel.d.ts +0 -2
- package/dist/models/UserProfileStepModel.d.ts.map +1 -1
- package/dist/models/UserProfileStepModel.js +1 -9
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum ArticleVisibility {
|
|
2
|
+
PUBLIC = "PUBLIC",
|
|
3
|
+
PRIVATE = "PRIVATE",
|
|
4
|
+
DRAFT = "DRAFT",
|
|
5
|
+
BANNED = "BANNED"
|
|
6
|
+
}
|
|
7
|
+
export declare enum ArticleContentType {
|
|
8
|
+
ARTICLE = "ARTICLE",
|
|
9
|
+
OUTLOOK = "OUTLOOK"
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=ArticleEnum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArticleEnum.d.ts","sourceRoot":"","sources":["../../../src/common/enums/ArticleEnum.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IACzB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,MAAM,WAAW;CACpB;AAED,oBAAY,kBAAkB;IAC1B,OAAO,YAAY;IACnB,OAAO,YAAY;CACtB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ArticleContentType = exports.ArticleVisibility = void 0;
|
|
4
|
+
var ArticleVisibility;
|
|
5
|
+
(function (ArticleVisibility) {
|
|
6
|
+
ArticleVisibility["PUBLIC"] = "PUBLIC";
|
|
7
|
+
ArticleVisibility["PRIVATE"] = "PRIVATE";
|
|
8
|
+
ArticleVisibility["DRAFT"] = "DRAFT";
|
|
9
|
+
ArticleVisibility["BANNED"] = "BANNED";
|
|
10
|
+
})(ArticleVisibility || (exports.ArticleVisibility = ArticleVisibility = {}));
|
|
11
|
+
var ArticleContentType;
|
|
12
|
+
(function (ArticleContentType) {
|
|
13
|
+
ArticleContentType["ARTICLE"] = "ARTICLE";
|
|
14
|
+
ArticleContentType["OUTLOOK"] = "OUTLOOK";
|
|
15
|
+
})(ArticleContentType || (exports.ArticleContentType = ArticleContentType = {}));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class ModifiedUserProfileStepsTable1774771856055 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1774771856055-modified_user_profile_steps_table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1774771856055-modified_user_profile_steps_table.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1774771856055-modified_user_profile_steps_table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,0CAA2C,YAAW,kBAAkB;IACjF,IAAI,SAA+C;IAEtC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAQ7D"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModifiedUserProfileStepsTable1774771856055 = void 0;
|
|
4
|
+
class ModifiedUserProfileStepsTable1774771856055 {
|
|
5
|
+
name = 'ModifiedUserProfileStepsTable1774771856055';
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TYPE "public"."user_profile_steps_profile_level_enum" AS ENUM('NONE', 'COMPLETED', 'STEP_ONE', 'STEP_TWO', 'STEP_THREE', 'STEP_FOUR', 'STEP_FIVE')`);
|
|
8
|
+
await queryRunner.query(`CREATE TABLE "user_profile_steps" ("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, "user_id" integer NOT NULL, "profile_level" "public"."user_profile_steps_profile_level_enum" NOT NULL DEFAULT 'NONE', CONSTRAINT "UQ_687ab57f8df0268e7504e99264b" UNIQUE ("uuid"), CONSTRAINT "UQ_355fca5e777aa6c734ac4711491" UNIQUE ("user_id", "profile_level"), CONSTRAINT "REL_226527f3e76ec2fd68a095439b" UNIQUE ("user_id"), CONSTRAINT "PK_624b8fd476147a0a1f4bd97a114" PRIMARY KEY ("id"))`);
|
|
9
|
+
await queryRunner.query(`CREATE INDEX "IDX_687ab57f8df0268e7504e99264" ON "user_profile_steps" ("uuid") `);
|
|
10
|
+
await queryRunner.query(`CREATE INDEX "IDX_355fca5e777aa6c734ac471149" ON "user_profile_steps" ("user_id", "profile_level") `);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "user_profile_steps" ADD CONSTRAINT "FK_226527f3e76ec2fd68a095439b7" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
12
|
+
}
|
|
13
|
+
async down(queryRunner) {
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "user_profile_steps" DROP CONSTRAINT "FK_226527f3e76ec2fd68a095439b7"`);
|
|
15
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_355fca5e777aa6c734ac471149"`);
|
|
16
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_687ab57f8df0268e7504e99264"`);
|
|
17
|
+
await queryRunner.query(`DROP TABLE "user_profile_steps"`);
|
|
18
|
+
await queryRunner.query(`DROP TYPE "public"."user_profile_steps_profile_level_enum"`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.ModifiedUserProfileStepsTable1774771856055 = ModifiedUserProfileStepsTable1774771856055;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class ModifiedUserProfileStepsTable1774773950819 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1774773950819-modified_user_profile_steps_table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1774773950819-modified_user_profile_steps_table.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1774773950819-modified_user_profile_steps_table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,0CAA2C,YAAW,kBAAkB;IACjF,IAAI,SAA+C;IAEtC,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.ModifiedUserProfileStepsTable1774773950819 = void 0;
|
|
4
|
+
class ModifiedUserProfileStepsTable1774773950819 {
|
|
5
|
+
name = 'ModifiedUserProfileStepsTable1774773950819';
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "connection_blacklist" DROP CONSTRAINT "UQ_d50c64ce70e8476a94e68f7fa40"`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "user_profile_steps" DROP CONSTRAINT "UQ_355fca5e777aa6c734ac4711491"`);
|
|
9
|
+
}
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "user_profile_steps" ADD CONSTRAINT "UQ_355fca5e777aa6c734ac4711491" UNIQUE ("user_id", "profile_level")`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "connection_blacklist" ADD CONSTRAINT "UQ_d50c64ce70e8476a94e68f7fa40" UNIQUE ("user_id", "blocked_user_id")`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.ModifiedUserProfileStepsTable1774773950819 = ModifiedUserProfileStepsTable1774773950819;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class ModifiedUserProfileStepsTable1774775712183 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1774775712183-modified_user_profile_steps_table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1774775712183-modified_user_profile_steps_table.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1774775712183-modified_user_profile_steps_table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,0CAA2C,YAAW,kBAAkB;IACjF,IAAI,SAA+C;IAEtC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAS3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAS7D"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModifiedUserProfileStepsTable1774775712183 = void 0;
|
|
4
|
+
class ModifiedUserProfileStepsTable1774775712183 {
|
|
5
|
+
name = 'ModifiedUserProfileStepsTable1774775712183';
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "connection_blacklist" DROP CONSTRAINT "FK_f07f2330d873ad775f83d589b48"`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "connection_blacklist" DROP CONSTRAINT "FK_6367a75e955a80211d4161fe02a"`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "user_profile_steps" DROP CONSTRAINT "FK_226527f3e76ec2fd68a095439b7"`);
|
|
10
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_355fca5e777aa6c734ac471149"`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "user_profile_steps" DROP CONSTRAINT "REL_226527f3e76ec2fd68a095439b"`);
|
|
12
|
+
await queryRunner.query(`CREATE INDEX "IDX_355fca5e777aa6c734ac471149" ON "user_profile_steps" ("user_id", "profile_level") `);
|
|
13
|
+
}
|
|
14
|
+
async down(queryRunner) {
|
|
15
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_355fca5e777aa6c734ac471149"`);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "user_profile_steps" ADD CONSTRAINT "REL_226527f3e76ec2fd68a095439b" UNIQUE ("user_id")`);
|
|
17
|
+
await queryRunner.query(`CREATE INDEX "IDX_355fca5e777aa6c734ac471149" ON "user_profile_steps" ("user_id", "profile_level") `);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE "user_profile_steps" ADD CONSTRAINT "FK_226527f3e76ec2fd68a095439b7" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
19
|
+
await queryRunner.query(`ALTER TABLE "connection_blacklist" ADD CONSTRAINT "FK_6367a75e955a80211d4161fe02a" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
20
|
+
await queryRunner.query(`ALTER TABLE "connection_blacklist" ADD CONSTRAINT "FK_f07f2330d873ad775f83d589b48" FOREIGN KEY ("blocked_user_id") REFERENCES "users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.ModifiedUserProfileStepsTable1774775712183 = ModifiedUserProfileStepsTable1774775712183;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class ModifiedArticlesTable1775127269923 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1775127269923-modified_articles_table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1775127269923-modified_articles_table.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1775127269923-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;IAa3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAa7D"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModifiedArticlesTable1775127269923 = void 0;
|
|
4
|
+
class ModifiedArticlesTable1775127269923 {
|
|
5
|
+
name = 'ModifiedArticlesTable1775127269923';
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TYPE "public"."articles_content_type_enum" AS ENUM('ARTICLE', 'OUTLOOK')`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "articles" ADD "content_type" "public"."articles_content_type_enum" NOT NULL DEFAULT 'ARTICLE'`);
|
|
9
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_ed999910633b8795e4373760d7"`);
|
|
10
|
+
await queryRunner.query(`ALTER TYPE "public"."articles_visibility_enum" RENAME TO "articles_visibility_enum_old"`);
|
|
11
|
+
await queryRunner.query(`CREATE TYPE "public"."articles_visibility_enum" AS ENUM('PUBLIC', 'PRIVATE', 'DRAFT', 'BANNED')`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "articles" ALTER COLUMN "visibility" DROP DEFAULT`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "articles" ALTER COLUMN "visibility" TYPE "public"."articles_visibility_enum" USING "visibility"::"text"::"public"."articles_visibility_enum"`);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "articles" ALTER COLUMN "visibility" SET DEFAULT 'PUBLIC'`);
|
|
15
|
+
await queryRunner.query(`DROP TYPE "public"."articles_visibility_enum_old"`);
|
|
16
|
+
await queryRunner.query(`CREATE INDEX "IDX_ed999910633b8795e4373760d7" ON "articles" ("is_sensitive", "user_id", "visibility") `);
|
|
17
|
+
}
|
|
18
|
+
async down(queryRunner) {
|
|
19
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_ed999910633b8795e4373760d7"`);
|
|
20
|
+
await queryRunner.query(`CREATE TYPE "public"."articles_visibility_enum_old" AS ENUM('PUBLIC', 'PRIVATE')`);
|
|
21
|
+
await queryRunner.query(`ALTER TABLE "articles" ALTER COLUMN "visibility" DROP DEFAULT`);
|
|
22
|
+
await queryRunner.query(`ALTER TABLE "articles" ALTER COLUMN "visibility" TYPE "public"."articles_visibility_enum_old" USING "visibility"::"text"::"public"."articles_visibility_enum_old"`);
|
|
23
|
+
await queryRunner.query(`ALTER TABLE "articles" ALTER COLUMN "visibility" SET DEFAULT 'PUBLIC'`);
|
|
24
|
+
await queryRunner.query(`DROP TYPE "public"."articles_visibility_enum"`);
|
|
25
|
+
await queryRunner.query(`ALTER TYPE "public"."articles_visibility_enum_old" RENAME TO "articles_visibility_enum"`);
|
|
26
|
+
await queryRunner.query(`CREATE INDEX "IDX_ed999910633b8795e4373760d7" ON "articles" ("user_id", "is_sensitive", "visibility") `);
|
|
27
|
+
await queryRunner.query(`ALTER TABLE "articles" DROP COLUMN "content_type"`);
|
|
28
|
+
await queryRunner.query(`DROP TYPE "public"."articles_content_type_enum"`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.ModifiedArticlesTable1775127269923 = ModifiedArticlesTable1775127269923;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { BaseModel } from "./BaseModel";
|
|
2
2
|
import { UserModel } from "./UserModel";
|
|
3
|
-
import {
|
|
3
|
+
import { ArticleContentType, ArticleVisibility } from "../common/enums/ArticleEnum";
|
|
4
4
|
import { PostImageModel } from "./PostImageModel";
|
|
5
5
|
import { CommentModel } from "./CommentModel";
|
|
6
6
|
export declare class ArticleModel extends BaseModel {
|
|
7
7
|
user_id: number;
|
|
8
8
|
is_sensitive?: boolean;
|
|
9
|
-
visibility:
|
|
9
|
+
visibility: ArticleVisibility;
|
|
10
|
+
content_type: ArticleContentType;
|
|
10
11
|
title?: string | null;
|
|
11
12
|
description: string;
|
|
12
13
|
user: UserModel;
|
|
@@ -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,
|
|
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,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAQ,EAAC,YAAY,EAAC,MAAO,gBAAgB,CAAC;AAE9C,qBAEa,YAAa,SAAQ,SAAS;IAEzC,OAAO,EAAG,MAAM,CAAC;IAGjB,YAAY,CAAC,EAAE,OAAO,CAAC;IAOvB,UAAU,EAAG,iBAAiB,CAAC;IAO/B,YAAY,EAAG,kBAAkB,CAAC;IAGlC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGtB,WAAW,EAAG,MAAM,CAAC;IAIrB,IAAI,EAAG,SAAS,CAAC;IAGjB,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;IAG1B,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC3B"}
|
|
@@ -13,13 +13,14 @@ exports.ArticleModel = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
const UserModel_1 = require("./UserModel");
|
|
16
|
-
const
|
|
16
|
+
const ArticleEnum_1 = require("../common/enums/ArticleEnum");
|
|
17
17
|
const PostImageModel_1 = require("./PostImageModel");
|
|
18
18
|
const CommentModel_1 = require("./CommentModel");
|
|
19
19
|
let ArticleModel = class ArticleModel extends BaseModel_1.BaseModel {
|
|
20
20
|
user_id;
|
|
21
21
|
is_sensitive;
|
|
22
22
|
visibility;
|
|
23
|
+
content_type;
|
|
23
24
|
title;
|
|
24
25
|
description;
|
|
25
26
|
user;
|
|
@@ -38,11 +39,19 @@ __decorate([
|
|
|
38
39
|
__decorate([
|
|
39
40
|
(0, typeorm_1.Column)({
|
|
40
41
|
type: "enum",
|
|
41
|
-
enum:
|
|
42
|
-
default:
|
|
42
|
+
enum: ArticleEnum_1.ArticleVisibility,
|
|
43
|
+
default: ArticleEnum_1.ArticleVisibility.PUBLIC,
|
|
43
44
|
}),
|
|
44
45
|
__metadata("design:type", String)
|
|
45
46
|
], ArticleModel.prototype, "visibility", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({
|
|
49
|
+
type: "enum",
|
|
50
|
+
enum: ArticleEnum_1.ArticleContentType,
|
|
51
|
+
default: ArticleEnum_1.ArticleContentType.ARTICLE,
|
|
52
|
+
}),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], ArticleModel.prototype, "content_type", void 0);
|
|
46
55
|
__decorate([
|
|
47
56
|
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
48
57
|
__metadata("design:type", Object)
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { UserModel } from "./UserModel";
|
|
2
1
|
import { BaseModel } from "./BaseModel";
|
|
3
2
|
export declare class ConnectionBlacklistModel extends BaseModel {
|
|
4
3
|
user_id: number;
|
|
5
4
|
blocked_user_id: number;
|
|
6
|
-
user: UserModel;
|
|
7
|
-
blacklisted_user: UserModel;
|
|
8
5
|
}
|
|
9
6
|
//# sourceMappingURL=ConnectionBlacklistModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionBlacklistModel.d.ts","sourceRoot":"","sources":["../../src/models/ConnectionBlacklistModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConnectionBlacklistModel.d.ts","sourceRoot":"","sources":["../../src/models/ConnectionBlacklistModel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAEa,wBAAyB,SAAQ,SAAS;IAEnD,OAAO,EAAG,MAAM,CAAC;IAGjB,eAAe,EAAG,MAAM,CAAC;CAS5B"}
|
|
@@ -11,13 +11,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ConnectionBlacklistModel = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
|
-
const UserModel_1 = require("./UserModel");
|
|
15
14
|
const BaseModel_1 = require("./BaseModel");
|
|
16
15
|
let ConnectionBlacklistModel = class ConnectionBlacklistModel extends BaseModel_1.BaseModel {
|
|
17
16
|
user_id;
|
|
18
17
|
blocked_user_id;
|
|
19
|
-
user;
|
|
20
|
-
blacklisted_user;
|
|
21
18
|
};
|
|
22
19
|
exports.ConnectionBlacklistModel = ConnectionBlacklistModel;
|
|
23
20
|
__decorate([
|
|
@@ -28,18 +25,7 @@ __decorate([
|
|
|
28
25
|
(0, typeorm_1.Column)(),
|
|
29
26
|
__metadata("design:type", Number)
|
|
30
27
|
], ConnectionBlacklistModel.prototype, "blocked_user_id", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, typeorm_1.ManyToOne)(() => UserModel_1.UserModel),
|
|
33
|
-
(0, typeorm_1.JoinColumn)({ name: 'user_id' }),
|
|
34
|
-
__metadata("design:type", UserModel_1.UserModel)
|
|
35
|
-
], ConnectionBlacklistModel.prototype, "user", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.ManyToOne)(() => UserModel_1.UserModel),
|
|
38
|
-
(0, typeorm_1.JoinColumn)({ name: 'blocked_user_id' }),
|
|
39
|
-
__metadata("design:type", UserModel_1.UserModel)
|
|
40
|
-
], ConnectionBlacklistModel.prototype, "blacklisted_user", void 0);
|
|
41
28
|
exports.ConnectionBlacklistModel = ConnectionBlacklistModel = __decorate([
|
|
42
29
|
(0, typeorm_1.Entity)('connection_blacklist'),
|
|
43
|
-
(0, typeorm_1.Unique)(['user_id', 'blocked_user_id']),
|
|
44
30
|
(0, typeorm_1.Index)(["user_id", "blocked_user_id"])
|
|
45
31
|
], ConnectionBlacklistModel);
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { BaseModel } from "./BaseModel";
|
|
2
|
-
import { UserModel } from "./UserModel";
|
|
3
2
|
import { ProfileLevel } from "../common/enums/UserEnums";
|
|
4
3
|
export declare class UserProfileStepModel extends BaseModel {
|
|
5
4
|
user_id: number;
|
|
6
5
|
profile_level: ProfileLevel;
|
|
7
|
-
user: UserModel;
|
|
8
6
|
}
|
|
9
7
|
//# sourceMappingURL=UserProfileStepModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserProfileStepModel.d.ts","sourceRoot":"","sources":["../../src/models/UserProfileStepModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"UserProfileStepModel.d.ts","sourceRoot":"","sources":["../../src/models/UserProfileStepModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,qBAEa,oBAAqB,SAAQ,SAAS;IAEjD,OAAO,EAAG,MAAM,CAAC;IAOjB,aAAa,EAAG,YAAY,CAAC;CAK9B"}
|
|
@@ -12,12 +12,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.UserProfileStepModel = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
const UserModel_1 = require("./UserModel");
|
|
16
15
|
const UserEnums_1 = require("../common/enums/UserEnums");
|
|
17
16
|
let UserProfileStepModel = class UserProfileStepModel extends BaseModel_1.BaseModel {
|
|
18
17
|
user_id;
|
|
19
18
|
profile_level;
|
|
20
|
-
user;
|
|
21
19
|
};
|
|
22
20
|
exports.UserProfileStepModel = UserProfileStepModel;
|
|
23
21
|
__decorate([
|
|
@@ -32,13 +30,7 @@ __decorate([
|
|
|
32
30
|
}),
|
|
33
31
|
__metadata("design:type", String)
|
|
34
32
|
], UserProfileStepModel.prototype, "profile_level", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, typeorm_1.OneToOne)(() => UserModel_1.UserModel, (user) => user.user_profile),
|
|
37
|
-
(0, typeorm_1.JoinColumn)({ name: "user_id", referencedColumnName: "id" }),
|
|
38
|
-
__metadata("design:type", UserModel_1.UserModel)
|
|
39
|
-
], UserProfileStepModel.prototype, "user", void 0);
|
|
40
33
|
exports.UserProfileStepModel = UserProfileStepModel = __decorate([
|
|
41
34
|
(0, typeorm_1.Entity)({ name: "user_profile_steps" }),
|
|
42
|
-
(0, typeorm_1.Index)(["user_id", "
|
|
43
|
-
(0, typeorm_1.Unique)(['user_id', 'profile_level'])
|
|
35
|
+
(0, typeorm_1.Index)(["user_id", "profile_level"])
|
|
44
36
|
], UserProfileStepModel);
|