@aurispec/core-backend 1.0.25 → 1.0.26
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/database/migrations/1774769626020-create_user_profile_steps_table.d.ts +7 -0
- package/dist/database/migrations/1774769626020-create_user_profile_steps_table.d.ts.map +1 -0
- package/dist/database/migrations/1774769626020-create_user_profile_steps_table.js +15 -0
- package/dist/models/ConnectionBlacklistModel.d.ts.map +1 -1
- package/dist/models/ConnectionBlacklistModel.js +3 -1
- package/dist/models/UserProfileStepModel.d.ts +9 -0
- package/dist/models/UserProfileStepModel.d.ts.map +1 -0
- package/dist/models/UserProfileStepModel.js +44 -0
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class CreateUserProfileStepsTable1774769626020 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1774769626020-create_user_profile_steps_table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1774769626020-create_user_profile_steps_table.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1774769626020-create_user_profile_steps_table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,wCAAyC,YAAW,kBAAkB;IAC/E,IAAI,SAA6C;IAEpC,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.CreateUserProfileStepsTable1774769626020 = void 0;
|
|
4
|
+
class CreateUserProfileStepsTable1774769626020 {
|
|
5
|
+
name = 'CreateUserProfileStepsTable1774769626020';
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE INDEX "IDX_d50c64ce70e8476a94e68f7fa4" ON "connection_blacklist" ("user_id", "blocked_user_id") `);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "connection_blacklist" ADD CONSTRAINT "UQ_d50c64ce70e8476a94e68f7fa40" UNIQUE ("user_id", "blocked_user_id")`);
|
|
9
|
+
}
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "connection_blacklist" DROP CONSTRAINT "UQ_d50c64ce70e8476a94e68f7fa40"`);
|
|
12
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_d50c64ce70e8476a94e68f7fa4"`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.CreateUserProfileStepsTable1774769626020 = CreateUserProfileStepsTable1774769626020;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionBlacklistModel.d.ts","sourceRoot":"","sources":["../../src/models/ConnectionBlacklistModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,
|
|
1
|
+
{"version":3,"file":"ConnectionBlacklistModel.d.ts","sourceRoot":"","sources":["../../src/models/ConnectionBlacklistModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAGa,wBAAyB,SAAQ,SAAS;IAEnD,OAAO,EAAG,MAAM,CAAC;IAGjB,eAAe,EAAG,MAAM,CAAC;IAIzB,IAAI,EAAG,SAAS,CAAC;IAIjB,gBAAgB,EAAG,SAAS,CAAC;CAChC"}
|
|
@@ -39,5 +39,7 @@ __decorate([
|
|
|
39
39
|
__metadata("design:type", UserModel_1.UserModel)
|
|
40
40
|
], ConnectionBlacklistModel.prototype, "blacklisted_user", void 0);
|
|
41
41
|
exports.ConnectionBlacklistModel = ConnectionBlacklistModel = __decorate([
|
|
42
|
-
(0, typeorm_1.Entity)('connection_blacklist')
|
|
42
|
+
(0, typeorm_1.Entity)('connection_blacklist'),
|
|
43
|
+
(0, typeorm_1.Unique)(['user_id', 'blocked_user_id']),
|
|
44
|
+
(0, typeorm_1.Index)(["user_id", "blocked_user_id"])
|
|
43
45
|
], ConnectionBlacklistModel);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
import { UserModel } from "./UserModel";
|
|
3
|
+
import { ProfileLevel } from "../common/enums/UserEnums";
|
|
4
|
+
export declare class UserProfileStepModel extends BaseModel {
|
|
5
|
+
user_id: number;
|
|
6
|
+
profile_level: ProfileLevel;
|
|
7
|
+
user: UserModel;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=UserProfileStepModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserProfileStepModel.d.ts","sourceRoot":"","sources":["../../src/models/UserProfileStepModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,qBAGa,oBAAqB,SAAQ,SAAS;IAEjD,OAAO,EAAG,MAAM,CAAC;IAOjB,aAAa,EAAG,YAAY,CAAC;IAI7B,IAAI,EAAG,SAAS,CAAC;CAClB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UserProfileStepModel = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const UserModel_1 = require("./UserModel");
|
|
16
|
+
const UserEnums_1 = require("../common/enums/UserEnums");
|
|
17
|
+
let UserProfileStepModel = class UserProfileStepModel extends BaseModel_1.BaseModel {
|
|
18
|
+
user_id;
|
|
19
|
+
profile_level;
|
|
20
|
+
user;
|
|
21
|
+
};
|
|
22
|
+
exports.UserProfileStepModel = UserProfileStepModel;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)(),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], UserProfileStepModel.prototype, "user_id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({
|
|
29
|
+
type: "enum",
|
|
30
|
+
enum: UserEnums_1.ProfileLevel,
|
|
31
|
+
default: UserEnums_1.ProfileLevel.NONE
|
|
32
|
+
}),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], 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
|
+
exports.UserProfileStepModel = UserProfileStepModel = __decorate([
|
|
41
|
+
(0, typeorm_1.Entity)({ name: "user_profile_steps" }),
|
|
42
|
+
(0, typeorm_1.Index)(["user_id", "is_completed", "profile_level"]),
|
|
43
|
+
(0, typeorm_1.Unique)(['user_id', 'profile_level'])
|
|
44
|
+
], UserProfileStepModel);
|