@aurispec/core-backend 1.0.52 → 1.0.54
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 +8 -1
- package/dist/common/enums/ArticleEnum.d.ts.map +1 -1
- package/dist/common/enums/ArticleEnum.js +9 -1
- package/dist/database/migrations/1775907591038-modified_features_table.d.ts +7 -0
- package/dist/database/migrations/1775907591038-modified_features_table.d.ts.map +1 -0
- package/dist/database/migrations/1775907591038-modified_features_table.js +15 -0
- package/dist/models/FeatureModel.d.ts +3 -0
- package/dist/models/FeatureModel.d.ts.map +1 -1
- package/dist/models/FeatureModel.js +12 -0
- package/dist/models/PostModel.d.ts +2 -0
- package/dist/models/PostModel.d.ts.map +1 -1
- package/dist/models/PostModel.js +10 -0
- package/package.json +1 -1
|
@@ -7,7 +7,14 @@ export declare enum ArticleVisibility {
|
|
|
7
7
|
export declare enum ArticleStatus {
|
|
8
8
|
ACTIVE = "ACTIVE",
|
|
9
9
|
PENDING = "PENDING",
|
|
10
|
-
BANNED = "BANNED"
|
|
10
|
+
BANNED = "BANNED",
|
|
11
|
+
FLAGGED = "FLAGGED"
|
|
12
|
+
}
|
|
13
|
+
export declare enum PostStatus {
|
|
14
|
+
ACTIVE = "ACTIVE",
|
|
15
|
+
PENDING = "PENDING",
|
|
16
|
+
BANNED = "BANNED",
|
|
17
|
+
FLAGGED = "FLAGGED"
|
|
11
18
|
}
|
|
12
19
|
export declare enum ArticleContentType {
|
|
13
20
|
ARTICLE = "ARTICLE",
|
|
@@ -1 +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,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;
|
|
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,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;CACtB;AAED,oBAAY,UAAU;IAClB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;CACtB;AAED,oBAAY,kBAAkB;IAC1B,OAAO,YAAY;IACnB,OAAO,YAAY;CACtB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ArticleContentType = exports.ArticleStatus = exports.ArticleVisibility = void 0;
|
|
3
|
+
exports.ArticleContentType = exports.PostStatus = exports.ArticleStatus = exports.ArticleVisibility = void 0;
|
|
4
4
|
var ArticleVisibility;
|
|
5
5
|
(function (ArticleVisibility) {
|
|
6
6
|
ArticleVisibility["PUBLIC"] = "PUBLIC";
|
|
@@ -13,7 +13,15 @@ var ArticleStatus;
|
|
|
13
13
|
ArticleStatus["ACTIVE"] = "ACTIVE";
|
|
14
14
|
ArticleStatus["PENDING"] = "PENDING";
|
|
15
15
|
ArticleStatus["BANNED"] = "BANNED";
|
|
16
|
+
ArticleStatus["FLAGGED"] = "FLAGGED";
|
|
16
17
|
})(ArticleStatus || (exports.ArticleStatus = ArticleStatus = {}));
|
|
18
|
+
var PostStatus;
|
|
19
|
+
(function (PostStatus) {
|
|
20
|
+
PostStatus["ACTIVE"] = "ACTIVE";
|
|
21
|
+
PostStatus["PENDING"] = "PENDING";
|
|
22
|
+
PostStatus["BANNED"] = "BANNED";
|
|
23
|
+
PostStatus["FLAGGED"] = "FLAGGED";
|
|
24
|
+
})(PostStatus || (exports.PostStatus = PostStatus = {}));
|
|
17
25
|
var ArticleContentType;
|
|
18
26
|
(function (ArticleContentType) {
|
|
19
27
|
ArticleContentType["ARTICLE"] = "ARTICLE";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class ModifiedFeaturesTable1775907591038 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1775907591038-modified_features_table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1775907591038-modified_features_table.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1775907591038-modified_features_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.ModifiedFeaturesTable1775907591038 = void 0;
|
|
4
|
+
class ModifiedFeaturesTable1775907591038 {
|
|
5
|
+
name = 'ModifiedFeaturesTable1775907591038';
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "features" ADD "admin_id" integer`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "features" ADD CONSTRAINT "FK_99e3058a0064e8d925c6bd9b0a2" 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 "features" DROP CONSTRAINT "FK_99e3058a0064e8d925c6bd9b0a2"`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "features" DROP COLUMN "admin_id"`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.ModifiedFeaturesTable1775907591038 = ModifiedFeaturesTable1775907591038;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { BaseModel } from "./BaseModel";
|
|
2
2
|
import { STATUS } from "../common/enums";
|
|
3
|
+
import { AdminUserModel } from "./AdminUserModel";
|
|
3
4
|
export declare class FeatureModel extends BaseModel {
|
|
4
5
|
name: string;
|
|
6
|
+
admin_id?: number;
|
|
5
7
|
code: string;
|
|
6
8
|
status: STATUS;
|
|
7
9
|
description: string;
|
|
10
|
+
admin: AdminUserModel;
|
|
8
11
|
}
|
|
9
12
|
//# sourceMappingURL=FeatureModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureModel.d.ts","sourceRoot":"","sources":["../../src/models/FeatureModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"FeatureModel.d.ts","sourceRoot":"","sources":["../../src/models/FeatureModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBACa,YAAa,SAAQ,SAAS;IAEzC,IAAI,EAAG,MAAM,CAAC;IAGd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,IAAI,EAAG,MAAM,CAAC;IAOd,MAAM,EAAG,MAAM,CAAC;IAGhB,WAAW,EAAG,MAAM,CAAC;IAIrB,KAAK,EAAG,cAAc,CAAC;CACxB"}
|
|
@@ -13,17 +13,24 @@ exports.FeatureModel = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
const enums_1 = require("../common/enums");
|
|
16
|
+
const AdminUserModel_1 = require("./AdminUserModel");
|
|
16
17
|
let FeatureModel = class FeatureModel extends BaseModel_1.BaseModel {
|
|
17
18
|
name;
|
|
19
|
+
admin_id;
|
|
18
20
|
code;
|
|
19
21
|
status;
|
|
20
22
|
description;
|
|
23
|
+
admin;
|
|
21
24
|
};
|
|
22
25
|
exports.FeatureModel = FeatureModel;
|
|
23
26
|
__decorate([
|
|
24
27
|
(0, typeorm_1.Column)(),
|
|
25
28
|
__metadata("design:type", String)
|
|
26
29
|
], FeatureModel.prototype, "name", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], FeatureModel.prototype, "admin_id", void 0);
|
|
27
34
|
__decorate([
|
|
28
35
|
(0, typeorm_1.Column)({ unique: true }),
|
|
29
36
|
__metadata("design:type", String)
|
|
@@ -40,6 +47,11 @@ __decorate([
|
|
|
40
47
|
(0, typeorm_1.Column)(),
|
|
41
48
|
__metadata("design:type", String)
|
|
42
49
|
], FeatureModel.prototype, "description", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.ManyToOne)(() => AdminUserModel_1.AdminUserModel),
|
|
52
|
+
(0, typeorm_1.JoinColumn)({ name: 'admin_id' }),
|
|
53
|
+
__metadata("design:type", AdminUserModel_1.AdminUserModel)
|
|
54
|
+
], FeatureModel.prototype, "admin", void 0);
|
|
43
55
|
exports.FeatureModel = FeatureModel = __decorate([
|
|
44
56
|
(0, typeorm_1.Entity)({ name: "features" })
|
|
45
57
|
], FeatureModel);
|
|
@@ -4,10 +4,12 @@ import { CommunityPostVisibility } from "../common/enums/CommunityEnum";
|
|
|
4
4
|
import { CommunityModel } from "./CommunityModel";
|
|
5
5
|
import { PostImageModel } from "./PostImageModel";
|
|
6
6
|
import { CommentModel } from "./CommentModel";
|
|
7
|
+
import { PostStatus } from "@/common/enums";
|
|
7
8
|
export declare class PostModel extends BaseModel {
|
|
8
9
|
user_id: number;
|
|
9
10
|
community_id: number;
|
|
10
11
|
is_boosted: boolean;
|
|
12
|
+
status: PostStatus;
|
|
11
13
|
is_sensitive: boolean;
|
|
12
14
|
visibility: CommunityPostVisibility;
|
|
13
15
|
title?: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostModel.d.ts","sourceRoot":"","sources":["../../src/models/PostModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAQ,EAAC,YAAY,EAAC,MAAO,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"PostModel.d.ts","sourceRoot":"","sources":["../../src/models/PostModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAQ,EAAC,YAAY,EAAC,MAAO,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,qBAEa,SAAU,SAAQ,SAAS;IAEtC,OAAO,EAAG,MAAM,CAAC;IAGjB,YAAY,EAAG,MAAM,CAAC;IAGtB,UAAU,EAAG,OAAO,CAAC;IAOrB,MAAM,EAAG,UAAU,CAAC;IAGpB,YAAY,EAAG,OAAO,CAAC;IAOvB,UAAU,EAAG,uBAAuB,CAAC;IAGrC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGtB,WAAW,EAAG,MAAM,CAAC;IAIrB,IAAI,EAAG,SAAS,CAAC;IAIjB,SAAS,EAAG,cAAc,CAAC;IAG3B,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;IAG1B,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC3B"}
|
package/dist/models/PostModel.js
CHANGED
|
@@ -17,10 +17,12 @@ const CommunityEnum_1 = require("../common/enums/CommunityEnum");
|
|
|
17
17
|
const CommunityModel_1 = require("./CommunityModel");
|
|
18
18
|
const PostImageModel_1 = require("./PostImageModel");
|
|
19
19
|
const CommentModel_1 = require("./CommentModel");
|
|
20
|
+
const enums_1 = require("@/common/enums");
|
|
20
21
|
let PostModel = class PostModel extends BaseModel_1.BaseModel {
|
|
21
22
|
user_id;
|
|
22
23
|
community_id;
|
|
23
24
|
is_boosted;
|
|
25
|
+
status;
|
|
24
26
|
is_sensitive;
|
|
25
27
|
visibility;
|
|
26
28
|
title;
|
|
@@ -43,6 +45,14 @@ __decorate([
|
|
|
43
45
|
(0, typeorm_1.Column)({ default: false }),
|
|
44
46
|
__metadata("design:type", Boolean)
|
|
45
47
|
], PostModel.prototype, "is_boosted", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({
|
|
50
|
+
type: "enum",
|
|
51
|
+
enum: enums_1.PostStatus,
|
|
52
|
+
default: enums_1.PostStatus.ACTIVE,
|
|
53
|
+
}),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], PostModel.prototype, "status", void 0);
|
|
46
56
|
__decorate([
|
|
47
57
|
(0, typeorm_1.Column)({ default: false }),
|
|
48
58
|
__metadata("design:type", Boolean)
|