@ooneex/typeorm 0.11.0 → 0.12.0
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/shared/chunk-0swb1h0m.js +51 -0
- package/dist/shared/{chunk-xwe8m6av.js.map → chunk-0swb1h0m.js.map} +2 -2
- package/dist/shared/chunk-2wdazj26.js +371 -0
- package/dist/shared/{chunk-5tnqjb3n.js.map → chunk-2wdazj26.js.map} +2 -2
- package/dist/shared/chunk-6m3p1ht9.js +606 -0
- package/dist/shared/{chunk-yrwsqc6r.js.map → chunk-6m3p1ht9.js.map} +2 -2
- package/dist/shared/{chunk-qrs0g3m9.js → chunk-6vmvyg0q.js} +58 -17
- package/dist/shared/{chunk-qrs0g3m9.js.map → chunk-6vmvyg0q.js.map} +2 -2
- package/dist/shared/chunk-bkdccdhn.js +105 -0
- package/dist/shared/{chunk-p22keb3y.js.map → chunk-bkdccdhn.js.map} +2 -2
- package/dist/shared/chunk-chan1evn.js +72 -0
- package/dist/shared/{chunk-xrqhqgen.js.map → chunk-chan1evn.js.map} +2 -2
- package/dist/shared/chunk-cv6xa6qy.js +621 -0
- package/dist/shared/{chunk-t1jad451.js.map → chunk-cv6xa6qy.js.map} +2 -2
- package/dist/shared/chunk-cwxhwya1.js +548 -0
- package/dist/shared/{chunk-x3pmm3na.js.map → chunk-cwxhwya1.js.map} +2 -2
- package/dist/shared/{chunk-qyf32qsz.js → chunk-eets3mef.js} +75 -22
- package/dist/shared/{chunk-qyf32qsz.js.map → chunk-eets3mef.js.map} +2 -2
- package/dist/shared/chunk-efmap3y3.js +345 -0
- package/dist/shared/{chunk-e51ktjsq.js.map → chunk-efmap3y3.js.map} +2 -2
- package/dist/shared/chunk-hkfj9j6w.js +30 -0
- package/dist/shared/{chunk-pbns711f.js.map → chunk-hkfj9j6w.js.map} +2 -2
- package/dist/shared/{chunk-aj0aak90.js → chunk-jap9t59k.js} +52 -14
- package/dist/shared/{chunk-aj0aak90.js.map → chunk-jap9t59k.js.map} +2 -2
- package/dist/shared/chunk-m4mpkr4n.js +34 -0
- package/dist/shared/{chunk-5ybg5hda.js.map → chunk-m4mpkr4n.js.map} +2 -2
- package/dist/shared/chunk-m9wkjs7v.js +639 -0
- package/dist/shared/{chunk-kw4t1san.js.map → chunk-m9wkjs7v.js.map} +2 -2
- package/dist/shared/chunk-mssxq87m.js +195 -0
- package/dist/shared/{chunk-6kdkyjbn.js.map → chunk-mssxq87m.js.map} +2 -2
- package/dist/shared/chunk-p12g6e7b.js +38 -0
- package/dist/shared/{chunk-6jnj2pfx.js.map → chunk-p12g6e7b.js.map} +2 -2
- package/dist/shared/chunk-qbn9p4vj.js +835 -0
- package/dist/shared/{chunk-nfv9ce7v.js.map → chunk-qbn9p4vj.js.map} +2 -2
- package/dist/shared/chunk-r9hsk9fk.js +20 -0
- package/dist/shared/{chunk-59vwmfpm.js.map → chunk-r9hsk9fk.js.map} +1 -1
- package/dist/shared/chunk-sk8z5zmk.js +112 -0
- package/dist/shared/{chunk-x2d798hg.js.map → chunk-sk8z5zmk.js.map} +2 -2
- package/dist/shared/chunk-tqd6ek7s.js +86 -0
- package/dist/shared/{chunk-19qhst35.js.map → chunk-tqd6ek7s.js.map} +2 -2
- package/dist/shared/{chunk-31y260d6.js → chunk-trhrh4e1.js} +89 -24
- package/dist/shared/{chunk-31y260d6.js.map → chunk-trhrh4e1.js.map} +2 -2
- package/dist/shared/chunk-wg7xcq50.js +38 -0
- package/dist/shared/{chunk-t5cy307m.js.map → chunk-wg7xcq50.js.map} +2 -2
- package/dist/shared/{chunk-jr0xys18.js → chunk-yszvxhf3.js} +41 -11
- package/dist/shared/{chunk-jr0xys18.js.map → chunk-yszvxhf3.js.map} +2 -2
- package/dist/src/entities/book/index.js +34 -2
- package/dist/src/entities/book/index.js.map +1 -1
- package/dist/src/entities/common/index.js +26 -2
- package/dist/src/entities/common/index.js.map +1 -1
- package/dist/src/entities/country/index.js +9 -2
- package/dist/src/entities/country/index.js.map +1 -1
- package/dist/src/entities/currency/index.js +9 -2
- package/dist/src/entities/currency/index.js.map +1 -1
- package/dist/src/entities/folder/index.js +394 -2
- package/dist/src/entities/folder/index.js.map +2 -2
- package/dist/src/entities/gamification/flashcard/index.js +26 -2
- package/dist/src/entities/gamification/flashcard/index.js.map +1 -1
- package/dist/src/entities/gamification/index.js +9 -2
- package/dist/src/entities/gamification/index.js.map +1 -1
- package/dist/src/entities/gamification/mcq/index.js +36 -2
- package/dist/src/entities/gamification/mcq/index.js.map +1 -1
- package/dist/src/entities/image/index.js +31 -2
- package/dist/src/entities/image/index.js.map +1 -1
- package/dist/src/entities/medecine/index.js +13 -2
- package/dist/src/entities/medecine/index.js.map +1 -1
- package/dist/src/entities/payment/index.js +23 -2
- package/dist/src/entities/payment/index.js.map +1 -1
- package/dist/src/entities/user/index.js +30 -2
- package/dist/src/entities/user/index.js.map +1 -1
- package/dist/src/entities/video/index.js +34 -2
- package/dist/src/entities/video/index.js.map +1 -1
- package/dist/src/migrations/book/index.js +541 -137
- package/dist/src/migrations/book/index.js.map +2 -2
- package/dist/src/migrations/common/index.js +63 -14
- package/dist/src/migrations/common/index.js.map +2 -2
- package/dist/src/migrations/country/index.js +48 -13
- package/dist/src/migrations/country/index.js.map +2 -2
- package/dist/src/migrations/currency/index.js +50 -14
- package/dist/src/migrations/currency/index.js.map +2 -2
- package/dist/src/migrations/folder/index.js +426 -104
- package/dist/src/migrations/folder/index.js.map +2 -2
- package/dist/src/migrations/gamification/flashcard/index.js +356 -96
- package/dist/src/migrations/gamification/flashcard/index.js.map +2 -2
- package/dist/src/migrations/gamification/index.js +8 -2
- package/dist/src/migrations/gamification/index.js.map +1 -1
- package/dist/src/migrations/gamification/mcq/index.js +553 -139
- package/dist/src/migrations/gamification/mcq/index.js.map +2 -2
- package/dist/src/migrations/image/index.js +353 -85
- package/dist/src/migrations/image/index.js.map +2 -2
- package/dist/src/migrations/medecine/index.js +132 -36
- package/dist/src/migrations/medecine/index.js.map +2 -2
- package/dist/src/migrations/payment/index.js +339 -94
- package/dist/src/migrations/payment/index.js.map +2 -2
- package/dist/src/migrations/user/index.js +331 -39
- package/dist/src/migrations/user/index.js.map +2 -2
- package/dist/src/migrations/video/index.js +345 -17
- package/dist/src/migrations/video/index.js.map +2 -2
- package/dist/src/repositories/book/index.js +997 -2
- package/dist/src/repositories/book/index.js.map +2 -2
- package/dist/src/repositories/common/index.js +439 -2
- package/dist/src/repositories/common/index.js.map +2 -2
- package/dist/src/repositories/country/index.js +89 -2
- package/dist/src/repositories/country/index.js.map +2 -2
- package/dist/src/repositories/currency/index.js +89 -2
- package/dist/src/repositories/currency/index.js.map +2 -2
- package/dist/src/repositories/gamification/flashcard/index.js +632 -2
- package/dist/src/repositories/gamification/flashcard/index.js.map +2 -2
- package/dist/src/repositories/gamification/index.js +160 -2
- package/dist/src/repositories/gamification/index.js.map +2 -2
- package/dist/src/repositories/gamification/mcq/index.js +1017 -2
- package/dist/src/repositories/gamification/mcq/index.js.map +2 -2
- package/dist/src/repositories/image/index.js +800 -2
- package/dist/src/repositories/image/index.js.map +2 -2
- package/dist/src/repositories/medecine/index.js +243 -2
- package/dist/src/repositories/medecine/index.js.map +2 -2
- package/dist/src/repositories/payment/index.js +560 -2
- package/dist/src/repositories/payment/index.js.map +2 -2
- package/dist/src/repositories/user/index.js +999 -2
- package/dist/src/repositories/user/index.js.map +2 -2
- package/dist/src/repositories/video/index.js +975 -2
- package/dist/src/repositories/video/index.js.map +2 -2
- package/package.json +1 -1
- package/dist/shared/chunk-19qhst35.js +0 -5
- package/dist/shared/chunk-59vwmfpm.js +0 -5
- package/dist/shared/chunk-5tnqjb3n.js +0 -5
- package/dist/shared/chunk-5ybg5hda.js +0 -5
- package/dist/shared/chunk-6jnj2pfx.js +0 -5
- package/dist/shared/chunk-6kdkyjbn.js +0 -5
- package/dist/shared/chunk-e51ktjsq.js +0 -5
- package/dist/shared/chunk-kw4t1san.js +0 -5
- package/dist/shared/chunk-nfv9ce7v.js +0 -5
- package/dist/shared/chunk-p22keb3y.js +0 -5
- package/dist/shared/chunk-pbns711f.js +0 -5
- package/dist/shared/chunk-t1jad451.js +0 -5
- package/dist/shared/chunk-t5cy307m.js +0 -5
- package/dist/shared/chunk-x2d798hg.js +0 -5
- package/dist/shared/chunk-x3pmm3na.js +0 -5
- package/dist/shared/chunk-xrqhqgen.js +0 -5
- package/dist/shared/chunk-xwe8m6av.js +0 -5
- package/dist/shared/chunk-yrwsqc6r.js +0 -5
|
@@ -0,0 +1,639 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
ImageEntity
|
|
4
|
+
} from "./chunk-bkdccdhn.js";
|
|
5
|
+
import {
|
|
6
|
+
BaseEntity
|
|
7
|
+
} from "./chunk-chan1evn.js";
|
|
8
|
+
import {
|
|
9
|
+
__legacyDecorateClassTS,
|
|
10
|
+
__legacyMetadataTS
|
|
11
|
+
} from "./chunk-r9hsk9fk.js";
|
|
12
|
+
|
|
13
|
+
// src/entities/user/UserEntity.ts
|
|
14
|
+
import { Column, Entity, JoinColumn, ManyToOne, OneToMany } from "typeorm";
|
|
15
|
+
class UserEntity extends BaseEntity {
|
|
16
|
+
}
|
|
17
|
+
__legacyDecorateClassTS([
|
|
18
|
+
Column({ name: "email", type: "varchar", length: 255, unique: true }),
|
|
19
|
+
__legacyMetadataTS("design:type", String)
|
|
20
|
+
], UserEntity.prototype, "email", undefined);
|
|
21
|
+
__legacyDecorateClassTS([
|
|
22
|
+
Column({ name: "roles", type: "simple-array" }),
|
|
23
|
+
__legacyMetadataTS("design:type", Array)
|
|
24
|
+
], UserEntity.prototype, "roles", undefined);
|
|
25
|
+
__legacyDecorateClassTS([
|
|
26
|
+
Column({ name: "name", type: "varchar", length: 255, nullable: true }),
|
|
27
|
+
__legacyMetadataTS("design:type", String)
|
|
28
|
+
], UserEntity.prototype, "name", undefined);
|
|
29
|
+
__legacyDecorateClassTS([
|
|
30
|
+
Column({ name: "last_name", type: "varchar", length: 255, nullable: true }),
|
|
31
|
+
__legacyMetadataTS("design:type", String)
|
|
32
|
+
], UserEntity.prototype, "lastName", undefined);
|
|
33
|
+
__legacyDecorateClassTS([
|
|
34
|
+
Column({ name: "first_name", type: "varchar", length: 255, nullable: true }),
|
|
35
|
+
__legacyMetadataTS("design:type", String)
|
|
36
|
+
], UserEntity.prototype, "firstName", undefined);
|
|
37
|
+
__legacyDecorateClassTS([
|
|
38
|
+
Column({ name: "username", type: "varchar", length: 100, unique: true, nullable: true }),
|
|
39
|
+
__legacyMetadataTS("design:type", String)
|
|
40
|
+
], UserEntity.prototype, "username", undefined);
|
|
41
|
+
__legacyDecorateClassTS([
|
|
42
|
+
ManyToOne(() => ImageEntity, {
|
|
43
|
+
nullable: true,
|
|
44
|
+
eager: false,
|
|
45
|
+
cascade: ["insert", "update"]
|
|
46
|
+
}),
|
|
47
|
+
JoinColumn({ name: "avatar_id" }),
|
|
48
|
+
__legacyMetadataTS("design:type", typeof IImage === "undefined" ? Object : IImage)
|
|
49
|
+
], UserEntity.prototype, "avatar", undefined);
|
|
50
|
+
__legacyDecorateClassTS([
|
|
51
|
+
Column({ name: "bio", type: "text", nullable: true }),
|
|
52
|
+
__legacyMetadataTS("design:type", String)
|
|
53
|
+
], UserEntity.prototype, "bio", undefined);
|
|
54
|
+
__legacyDecorateClassTS([
|
|
55
|
+
Column({ name: "phone", type: "varchar", length: 20, nullable: true }),
|
|
56
|
+
__legacyMetadataTS("design:type", String)
|
|
57
|
+
], UserEntity.prototype, "phone", undefined);
|
|
58
|
+
__legacyDecorateClassTS([
|
|
59
|
+
Column({ name: "birth_date", type: "date", nullable: true }),
|
|
60
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
61
|
+
], UserEntity.prototype, "birthDate", undefined);
|
|
62
|
+
__legacyDecorateClassTS([
|
|
63
|
+
Column({ name: "timezone", type: "varchar", length: 50, nullable: true }),
|
|
64
|
+
__legacyMetadataTS("design:type", String)
|
|
65
|
+
], UserEntity.prototype, "timezone", undefined);
|
|
66
|
+
__legacyDecorateClassTS([
|
|
67
|
+
Column({ name: "is_email_verified", type: "boolean", default: false, nullable: true }),
|
|
68
|
+
__legacyMetadataTS("design:type", Boolean)
|
|
69
|
+
], UserEntity.prototype, "isEmailVerified", undefined);
|
|
70
|
+
__legacyDecorateClassTS([
|
|
71
|
+
Column({ name: "is_phone_verified", type: "boolean", default: false, nullable: true }),
|
|
72
|
+
__legacyMetadataTS("design:type", Boolean)
|
|
73
|
+
], UserEntity.prototype, "isPhoneVerified", undefined);
|
|
74
|
+
__legacyDecorateClassTS([
|
|
75
|
+
Column({ name: "last_active_at", type: "timestamptz", nullable: true }),
|
|
76
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
77
|
+
], UserEntity.prototype, "lastActiveAt", undefined);
|
|
78
|
+
__legacyDecorateClassTS([
|
|
79
|
+
Column({ name: "email_verified_at", type: "timestamptz", nullable: true }),
|
|
80
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
81
|
+
], UserEntity.prototype, "emailVerifiedAt", undefined);
|
|
82
|
+
__legacyDecorateClassTS([
|
|
83
|
+
Column({ name: "phone_verified_at", type: "timestamptz", nullable: true }),
|
|
84
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
85
|
+
], UserEntity.prototype, "phoneVerifiedAt", undefined);
|
|
86
|
+
__legacyDecorateClassTS([
|
|
87
|
+
Column({ name: "last_login_at", type: "timestamptz", nullable: true }),
|
|
88
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
89
|
+
], UserEntity.prototype, "lastLoginAt", undefined);
|
|
90
|
+
__legacyDecorateClassTS([
|
|
91
|
+
Column({ name: "password_changed_at", type: "timestamptz", nullable: true }),
|
|
92
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
93
|
+
], UserEntity.prototype, "passwordChangedAt", undefined);
|
|
94
|
+
__legacyDecorateClassTS([
|
|
95
|
+
Column({ name: "two_factor_enabled", type: "boolean", default: false, nullable: true }),
|
|
96
|
+
__legacyMetadataTS("design:type", Boolean)
|
|
97
|
+
], UserEntity.prototype, "twoFactorEnabled", undefined);
|
|
98
|
+
__legacyDecorateClassTS([
|
|
99
|
+
Column({ name: "two_factor_secret", type: "varchar", length: 255, nullable: true }),
|
|
100
|
+
__legacyMetadataTS("design:type", String)
|
|
101
|
+
], UserEntity.prototype, "twoFactorSecret", undefined);
|
|
102
|
+
__legacyDecorateClassTS([
|
|
103
|
+
Column({ name: "recovery_tokens", type: "simple-array", nullable: true }),
|
|
104
|
+
__legacyMetadataTS("design:type", Array)
|
|
105
|
+
], UserEntity.prototype, "recoveryTokens", undefined);
|
|
106
|
+
__legacyDecorateClassTS([
|
|
107
|
+
OneToMany("SessionEntity", "user", {
|
|
108
|
+
nullable: true,
|
|
109
|
+
eager: false,
|
|
110
|
+
cascade: ["insert", "update"]
|
|
111
|
+
}),
|
|
112
|
+
__legacyMetadataTS("design:type", Array)
|
|
113
|
+
], UserEntity.prototype, "sessions", undefined);
|
|
114
|
+
__legacyDecorateClassTS([
|
|
115
|
+
OneToMany("AccountEntity", "user", {
|
|
116
|
+
nullable: true,
|
|
117
|
+
eager: false,
|
|
118
|
+
cascade: ["insert", "update"]
|
|
119
|
+
}),
|
|
120
|
+
__legacyMetadataTS("design:type", Array)
|
|
121
|
+
], UserEntity.prototype, "accounts", undefined);
|
|
122
|
+
__legacyDecorateClassTS([
|
|
123
|
+
OneToMany("VerificationEntity", "user", {
|
|
124
|
+
nullable: true,
|
|
125
|
+
eager: false,
|
|
126
|
+
cascade: ["insert", "update"]
|
|
127
|
+
}),
|
|
128
|
+
__legacyMetadataTS("design:type", Array)
|
|
129
|
+
], UserEntity.prototype, "verifications", undefined);
|
|
130
|
+
UserEntity = __legacyDecorateClassTS([
|
|
131
|
+
Entity({
|
|
132
|
+
name: "users"
|
|
133
|
+
})
|
|
134
|
+
], UserEntity);
|
|
135
|
+
|
|
136
|
+
// src/entities/user/AccountEntity.ts
|
|
137
|
+
import { EAccountType } from "@ooneex/user";
|
|
138
|
+
import { Column as Column2, Entity as Entity2, JoinColumn as JoinColumn2, ManyToOne as ManyToOne2 } from "typeorm";
|
|
139
|
+
class AccountEntity extends BaseEntity {
|
|
140
|
+
}
|
|
141
|
+
__legacyDecorateClassTS([
|
|
142
|
+
Column2({ name: "provider", type: "varchar", length: 100, nullable: true }),
|
|
143
|
+
__legacyMetadataTS("design:type", String)
|
|
144
|
+
], AccountEntity.prototype, "provider", undefined);
|
|
145
|
+
__legacyDecorateClassTS([
|
|
146
|
+
Column2({ name: "provider_account_id", type: "varchar", length: 255, nullable: true }),
|
|
147
|
+
__legacyMetadataTS("design:type", String)
|
|
148
|
+
], AccountEntity.prototype, "providerAccountId", undefined);
|
|
149
|
+
__legacyDecorateClassTS([
|
|
150
|
+
Column2({
|
|
151
|
+
name: "type",
|
|
152
|
+
type: "enum",
|
|
153
|
+
enum: EAccountType
|
|
154
|
+
}),
|
|
155
|
+
__legacyMetadataTS("design:type", typeof EAccountType === "undefined" ? Object : EAccountType)
|
|
156
|
+
], AccountEntity.prototype, "type", undefined);
|
|
157
|
+
__legacyDecorateClassTS([
|
|
158
|
+
Column2({ name: "password", type: "varchar", length: 255, nullable: true }),
|
|
159
|
+
__legacyMetadataTS("design:type", String)
|
|
160
|
+
], AccountEntity.prototype, "password", undefined);
|
|
161
|
+
__legacyDecorateClassTS([
|
|
162
|
+
Column2({ name: "access_token", type: "text", nullable: true }),
|
|
163
|
+
__legacyMetadataTS("design:type", String)
|
|
164
|
+
], AccountEntity.prototype, "accessToken", undefined);
|
|
165
|
+
__legacyDecorateClassTS([
|
|
166
|
+
Column2({ name: "access_token_expires_at", type: "timestamptz", nullable: true }),
|
|
167
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
168
|
+
], AccountEntity.prototype, "accessTokenExpiresAt", undefined);
|
|
169
|
+
__legacyDecorateClassTS([
|
|
170
|
+
Column2({ name: "refresh_token", type: "text", nullable: true }),
|
|
171
|
+
__legacyMetadataTS("design:type", String)
|
|
172
|
+
], AccountEntity.prototype, "refreshToken", undefined);
|
|
173
|
+
__legacyDecorateClassTS([
|
|
174
|
+
Column2({ name: "refresh_token_expires_at", type: "timestamptz", nullable: true }),
|
|
175
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
176
|
+
], AccountEntity.prototype, "refreshTokenExpiresAt", undefined);
|
|
177
|
+
__legacyDecorateClassTS([
|
|
178
|
+
Column2({ name: "expires_at", type: "timestamptz", nullable: true }),
|
|
179
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
180
|
+
], AccountEntity.prototype, "expiresAt", undefined);
|
|
181
|
+
__legacyDecorateClassTS([
|
|
182
|
+
Column2({ name: "token_type", type: "varchar", length: 50, nullable: true }),
|
|
183
|
+
__legacyMetadataTS("design:type", String)
|
|
184
|
+
], AccountEntity.prototype, "tokenType", undefined);
|
|
185
|
+
__legacyDecorateClassTS([
|
|
186
|
+
Column2({ name: "scope", type: "text", nullable: true }),
|
|
187
|
+
__legacyMetadataTS("design:type", String)
|
|
188
|
+
], AccountEntity.prototype, "scope", undefined);
|
|
189
|
+
__legacyDecorateClassTS([
|
|
190
|
+
Column2({ name: "id_token", type: "text", nullable: true }),
|
|
191
|
+
__legacyMetadataTS("design:type", String)
|
|
192
|
+
], AccountEntity.prototype, "idToken", undefined);
|
|
193
|
+
__legacyDecorateClassTS([
|
|
194
|
+
Column2({ name: "session_state", type: "varchar", length: 255, nullable: true }),
|
|
195
|
+
__legacyMetadataTS("design:type", String)
|
|
196
|
+
], AccountEntity.prototype, "sessionState", undefined);
|
|
197
|
+
__legacyDecorateClassTS([
|
|
198
|
+
Column2({ name: "email", type: "varchar", length: 255, nullable: true }),
|
|
199
|
+
__legacyMetadataTS("design:type", String)
|
|
200
|
+
], AccountEntity.prototype, "email", undefined);
|
|
201
|
+
__legacyDecorateClassTS([
|
|
202
|
+
Column2({ name: "email_verified", type: "boolean", default: false, nullable: true }),
|
|
203
|
+
__legacyMetadataTS("design:type", Boolean)
|
|
204
|
+
], AccountEntity.prototype, "emailVerified", undefined);
|
|
205
|
+
__legacyDecorateClassTS([
|
|
206
|
+
Column2({ name: "name", type: "varchar", length: 255, nullable: true }),
|
|
207
|
+
__legacyMetadataTS("design:type", String)
|
|
208
|
+
], AccountEntity.prototype, "name", undefined);
|
|
209
|
+
__legacyDecorateClassTS([
|
|
210
|
+
Column2({ name: "picture", type: "varchar", length: 500, nullable: true }),
|
|
211
|
+
__legacyMetadataTS("design:type", String)
|
|
212
|
+
], AccountEntity.prototype, "picture", undefined);
|
|
213
|
+
__legacyDecorateClassTS([
|
|
214
|
+
Column2({ name: "profile", type: "jsonb", nullable: true }),
|
|
215
|
+
__legacyMetadataTS("design:type", typeof Record === "undefined" ? Object : Record)
|
|
216
|
+
], AccountEntity.prototype, "profile", undefined);
|
|
217
|
+
__legacyDecorateClassTS([
|
|
218
|
+
ManyToOne2(() => UserEntity, (user) => user.accounts, {
|
|
219
|
+
nullable: true,
|
|
220
|
+
eager: false,
|
|
221
|
+
onDelete: "CASCADE"
|
|
222
|
+
}),
|
|
223
|
+
JoinColumn2({ name: "user_id" }),
|
|
224
|
+
__legacyMetadataTS("design:type", typeof IUser === "undefined" ? Object : IUser)
|
|
225
|
+
], AccountEntity.prototype, "user", undefined);
|
|
226
|
+
AccountEntity = __legacyDecorateClassTS([
|
|
227
|
+
Entity2({
|
|
228
|
+
name: "accounts"
|
|
229
|
+
})
|
|
230
|
+
], AccountEntity);
|
|
231
|
+
|
|
232
|
+
// src/entities/user/SessionEntity.ts
|
|
233
|
+
import { Column as Column3, Entity as Entity3, JoinColumn as JoinColumn3, ManyToOne as ManyToOne3 } from "typeorm";
|
|
234
|
+
class SessionEntity extends BaseEntity {
|
|
235
|
+
}
|
|
236
|
+
__legacyDecorateClassTS([
|
|
237
|
+
Column3({ name: "token", type: "varchar", length: 255, unique: true }),
|
|
238
|
+
__legacyMetadataTS("design:type", String)
|
|
239
|
+
], SessionEntity.prototype, "token", undefined);
|
|
240
|
+
__legacyDecorateClassTS([
|
|
241
|
+
Column3({ name: "refresh_token", type: "varchar", length: 255, nullable: true }),
|
|
242
|
+
__legacyMetadataTS("design:type", String)
|
|
243
|
+
], SessionEntity.prototype, "refreshToken", undefined);
|
|
244
|
+
__legacyDecorateClassTS([
|
|
245
|
+
Column3({ name: "user_agent", type: "text", nullable: true }),
|
|
246
|
+
__legacyMetadataTS("design:type", String)
|
|
247
|
+
], SessionEntity.prototype, "userAgent", undefined);
|
|
248
|
+
__legacyDecorateClassTS([
|
|
249
|
+
Column3({ name: "ip_address", type: "inet", nullable: true }),
|
|
250
|
+
__legacyMetadataTS("design:type", String)
|
|
251
|
+
], SessionEntity.prototype, "ipAddress", undefined);
|
|
252
|
+
__legacyDecorateClassTS([
|
|
253
|
+
Column3({ name: "device_type", type: "varchar", length: 50, nullable: true }),
|
|
254
|
+
__legacyMetadataTS("design:type", String)
|
|
255
|
+
], SessionEntity.prototype, "deviceType", undefined);
|
|
256
|
+
__legacyDecorateClassTS([
|
|
257
|
+
Column3({ name: "device_name", type: "varchar", length: 255, nullable: true }),
|
|
258
|
+
__legacyMetadataTS("design:type", String)
|
|
259
|
+
], SessionEntity.prototype, "deviceName", undefined);
|
|
260
|
+
__legacyDecorateClassTS([
|
|
261
|
+
Column3({ name: "browser", type: "varchar", length: 255, nullable: true }),
|
|
262
|
+
__legacyMetadataTS("design:type", String)
|
|
263
|
+
], SessionEntity.prototype, "browser", undefined);
|
|
264
|
+
__legacyDecorateClassTS([
|
|
265
|
+
Column3({ name: "operating_system", type: "varchar", length: 255, nullable: true }),
|
|
266
|
+
__legacyMetadataTS("design:type", String)
|
|
267
|
+
], SessionEntity.prototype, "operatingSystem", undefined);
|
|
268
|
+
__legacyDecorateClassTS([
|
|
269
|
+
Column3({ name: "location", type: "varchar", length: 255, nullable: true }),
|
|
270
|
+
__legacyMetadataTS("design:type", String)
|
|
271
|
+
], SessionEntity.prototype, "location", undefined);
|
|
272
|
+
__legacyDecorateClassTS([
|
|
273
|
+
Column3({ name: "is_active", type: "boolean", default: true }),
|
|
274
|
+
__legacyMetadataTS("design:type", Boolean)
|
|
275
|
+
], SessionEntity.prototype, "isActive", undefined);
|
|
276
|
+
__legacyDecorateClassTS([
|
|
277
|
+
Column3({ name: "expires_at", type: "timestamptz" }),
|
|
278
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
279
|
+
], SessionEntity.prototype, "expiresAt", undefined);
|
|
280
|
+
__legacyDecorateClassTS([
|
|
281
|
+
Column3({ name: "last_access_at", type: "timestamptz", nullable: true }),
|
|
282
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
283
|
+
], SessionEntity.prototype, "lastAccessAt", undefined);
|
|
284
|
+
__legacyDecorateClassTS([
|
|
285
|
+
Column3({ name: "revoked_at", type: "timestamptz", nullable: true }),
|
|
286
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
287
|
+
], SessionEntity.prototype, "revokedAt", undefined);
|
|
288
|
+
__legacyDecorateClassTS([
|
|
289
|
+
Column3({ name: "revoked_reason", type: "varchar", length: 255, nullable: true }),
|
|
290
|
+
__legacyMetadataTS("design:type", String)
|
|
291
|
+
], SessionEntity.prototype, "revokedReason", undefined);
|
|
292
|
+
__legacyDecorateClassTS([
|
|
293
|
+
ManyToOne3(() => UserEntity, (user) => user.sessions, {
|
|
294
|
+
nullable: true,
|
|
295
|
+
eager: false,
|
|
296
|
+
onDelete: "CASCADE"
|
|
297
|
+
}),
|
|
298
|
+
JoinColumn3({ name: "user_id" }),
|
|
299
|
+
__legacyMetadataTS("design:type", typeof IUser === "undefined" ? Object : IUser)
|
|
300
|
+
], SessionEntity.prototype, "user", undefined);
|
|
301
|
+
SessionEntity = __legacyDecorateClassTS([
|
|
302
|
+
Entity3({
|
|
303
|
+
name: "sessions"
|
|
304
|
+
})
|
|
305
|
+
], SessionEntity);
|
|
306
|
+
|
|
307
|
+
// src/entities/user/UserBlockedEntity.ts
|
|
308
|
+
import { Column as Column4, Entity as Entity4, JoinColumn as JoinColumn4, ManyToOne as ManyToOne4 } from "typeorm";
|
|
309
|
+
class UserBlockedEntity extends BaseEntity {
|
|
310
|
+
}
|
|
311
|
+
__legacyDecorateClassTS([
|
|
312
|
+
ManyToOne4(() => UserEntity, {
|
|
313
|
+
nullable: true,
|
|
314
|
+
eager: false
|
|
315
|
+
}),
|
|
316
|
+
JoinColumn4({ name: "user_id" }),
|
|
317
|
+
__legacyMetadataTS("design:type", typeof IUser === "undefined" ? Object : IUser)
|
|
318
|
+
], UserBlockedEntity.prototype, "user", undefined);
|
|
319
|
+
__legacyDecorateClassTS([
|
|
320
|
+
Column4({ name: "user_id", type: "varchar", length: 25, nullable: true }),
|
|
321
|
+
__legacyMetadataTS("design:type", String)
|
|
322
|
+
], UserBlockedEntity.prototype, "userId", undefined);
|
|
323
|
+
__legacyDecorateClassTS([
|
|
324
|
+
Column4({ name: "blocked_by", type: "varchar", length: 255, nullable: true }),
|
|
325
|
+
__legacyMetadataTS("design:type", String)
|
|
326
|
+
], UserBlockedEntity.prototype, "blockedBy", undefined);
|
|
327
|
+
__legacyDecorateClassTS([
|
|
328
|
+
Column4({ name: "blocked_by_id", type: "varchar", length: 25, nullable: true }),
|
|
329
|
+
__legacyMetadataTS("design:type", String)
|
|
330
|
+
], UserBlockedEntity.prototype, "blockedById", undefined);
|
|
331
|
+
__legacyDecorateClassTS([
|
|
332
|
+
Column4({ name: "reason", type: "text", nullable: true }),
|
|
333
|
+
__legacyMetadataTS("design:type", String)
|
|
334
|
+
], UserBlockedEntity.prototype, "reason", undefined);
|
|
335
|
+
UserBlockedEntity = __legacyDecorateClassTS([
|
|
336
|
+
Entity4({
|
|
337
|
+
name: "users_blocked"
|
|
338
|
+
})
|
|
339
|
+
], UserBlockedEntity);
|
|
340
|
+
|
|
341
|
+
// src/entities/user/UserFollowedEntity.ts
|
|
342
|
+
import { Column as Column5, Entity as Entity5, JoinColumn as JoinColumn5, ManyToOne as ManyToOne5 } from "typeorm";
|
|
343
|
+
class UserFollowedEntity extends BaseEntity {
|
|
344
|
+
}
|
|
345
|
+
__legacyDecorateClassTS([
|
|
346
|
+
ManyToOne5(() => UserEntity, {
|
|
347
|
+
nullable: true,
|
|
348
|
+
eager: false
|
|
349
|
+
}),
|
|
350
|
+
JoinColumn5({ name: "user_id" }),
|
|
351
|
+
__legacyMetadataTS("design:type", typeof IUser === "undefined" ? Object : IUser)
|
|
352
|
+
], UserFollowedEntity.prototype, "user", undefined);
|
|
353
|
+
__legacyDecorateClassTS([
|
|
354
|
+
Column5({ name: "user_id", type: "varchar", length: 25, nullable: true }),
|
|
355
|
+
__legacyMetadataTS("design:type", String)
|
|
356
|
+
], UserFollowedEntity.prototype, "userId", undefined);
|
|
357
|
+
__legacyDecorateClassTS([
|
|
358
|
+
Column5({ name: "followed_by", type: "varchar", length: 255, nullable: true }),
|
|
359
|
+
__legacyMetadataTS("design:type", String)
|
|
360
|
+
], UserFollowedEntity.prototype, "followedBy", undefined);
|
|
361
|
+
__legacyDecorateClassTS([
|
|
362
|
+
Column5({ name: "followed_by_id", type: "varchar", length: 25, nullable: true }),
|
|
363
|
+
__legacyMetadataTS("design:type", String)
|
|
364
|
+
], UserFollowedEntity.prototype, "followedById", undefined);
|
|
365
|
+
UserFollowedEntity = __legacyDecorateClassTS([
|
|
366
|
+
Entity5({
|
|
367
|
+
name: "users_followed"
|
|
368
|
+
})
|
|
369
|
+
], UserFollowedEntity);
|
|
370
|
+
|
|
371
|
+
// src/entities/user/VerificationEntity.ts
|
|
372
|
+
import { EVerificationType } from "@ooneex/user";
|
|
373
|
+
import { Column as Column6, Entity as Entity6, JoinColumn as JoinColumn6, ManyToOne as ManyToOne6 } from "typeorm";
|
|
374
|
+
class VerificationEntity extends BaseEntity {
|
|
375
|
+
}
|
|
376
|
+
__legacyDecorateClassTS([
|
|
377
|
+
Column6({ name: "email", type: "varchar", length: 255, nullable: true }),
|
|
378
|
+
__legacyMetadataTS("design:type", String)
|
|
379
|
+
], VerificationEntity.prototype, "email", undefined);
|
|
380
|
+
__legacyDecorateClassTS([
|
|
381
|
+
Column6({ name: "phone", type: "varchar", length: 20, nullable: true }),
|
|
382
|
+
__legacyMetadataTS("design:type", String)
|
|
383
|
+
], VerificationEntity.prototype, "phone", undefined);
|
|
384
|
+
__legacyDecorateClassTS([
|
|
385
|
+
Column6({ name: "token", type: "varchar", length: 255, unique: true }),
|
|
386
|
+
__legacyMetadataTS("design:type", String)
|
|
387
|
+
], VerificationEntity.prototype, "token", undefined);
|
|
388
|
+
__legacyDecorateClassTS([
|
|
389
|
+
Column6({
|
|
390
|
+
name: "type",
|
|
391
|
+
type: "enum",
|
|
392
|
+
enum: EVerificationType
|
|
393
|
+
}),
|
|
394
|
+
__legacyMetadataTS("design:type", typeof EVerificationType === "undefined" ? Object : EVerificationType)
|
|
395
|
+
], VerificationEntity.prototype, "type", undefined);
|
|
396
|
+
__legacyDecorateClassTS([
|
|
397
|
+
Column6({ name: "code", type: "varchar", length: 10, nullable: true }),
|
|
398
|
+
__legacyMetadataTS("design:type", String)
|
|
399
|
+
], VerificationEntity.prototype, "code", undefined);
|
|
400
|
+
__legacyDecorateClassTS([
|
|
401
|
+
Column6({ name: "is_used", type: "boolean", default: false }),
|
|
402
|
+
__legacyMetadataTS("design:type", Boolean)
|
|
403
|
+
], VerificationEntity.prototype, "isUsed", undefined);
|
|
404
|
+
__legacyDecorateClassTS([
|
|
405
|
+
Column6({ name: "used_at", type: "timestamptz", nullable: true }),
|
|
406
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
407
|
+
], VerificationEntity.prototype, "usedAt", undefined);
|
|
408
|
+
__legacyDecorateClassTS([
|
|
409
|
+
Column6({ name: "expires_at", type: "timestamptz" }),
|
|
410
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
411
|
+
], VerificationEntity.prototype, "expiresAt", undefined);
|
|
412
|
+
__legacyDecorateClassTS([
|
|
413
|
+
Column6({ name: "attempts_count", type: "int", default: 0 }),
|
|
414
|
+
__legacyMetadataTS("design:type", Number)
|
|
415
|
+
], VerificationEntity.prototype, "attemptsCount", undefined);
|
|
416
|
+
__legacyDecorateClassTS([
|
|
417
|
+
Column6({ name: "max_attempts", type: "int", default: 5 }),
|
|
418
|
+
__legacyMetadataTS("design:type", Number)
|
|
419
|
+
], VerificationEntity.prototype, "maxAttempts", undefined);
|
|
420
|
+
__legacyDecorateClassTS([
|
|
421
|
+
Column6({ name: "ip_address", type: "inet", nullable: true }),
|
|
422
|
+
__legacyMetadataTS("design:type", String)
|
|
423
|
+
], VerificationEntity.prototype, "ipAddress", undefined);
|
|
424
|
+
__legacyDecorateClassTS([
|
|
425
|
+
Column6({ name: "user_agent", type: "text", nullable: true }),
|
|
426
|
+
__legacyMetadataTS("design:type", String)
|
|
427
|
+
], VerificationEntity.prototype, "userAgent", undefined);
|
|
428
|
+
__legacyDecorateClassTS([
|
|
429
|
+
Column6({ name: "metadata", type: "jsonb", nullable: true }),
|
|
430
|
+
__legacyMetadataTS("design:type", typeof Record === "undefined" ? Object : Record)
|
|
431
|
+
], VerificationEntity.prototype, "metadata", undefined);
|
|
432
|
+
__legacyDecorateClassTS([
|
|
433
|
+
Column6({ name: "description", type: "text", nullable: true }),
|
|
434
|
+
__legacyMetadataTS("design:type", String)
|
|
435
|
+
], VerificationEntity.prototype, "description", undefined);
|
|
436
|
+
__legacyDecorateClassTS([
|
|
437
|
+
ManyToOne6(() => UserEntity, (user) => user.verifications, {
|
|
438
|
+
nullable: true,
|
|
439
|
+
eager: false,
|
|
440
|
+
onDelete: "CASCADE"
|
|
441
|
+
}),
|
|
442
|
+
JoinColumn6({ name: "user_id" }),
|
|
443
|
+
__legacyMetadataTS("design:type", typeof IUser === "undefined" ? Object : IUser)
|
|
444
|
+
], VerificationEntity.prototype, "user", undefined);
|
|
445
|
+
VerificationEntity = __legacyDecorateClassTS([
|
|
446
|
+
Entity6({
|
|
447
|
+
name: "verifications"
|
|
448
|
+
})
|
|
449
|
+
], VerificationEntity);
|
|
450
|
+
|
|
451
|
+
// src/entities/user/UserProfileUpdateEntity.ts
|
|
452
|
+
import { EProfileUpdateStatus } from "@ooneex/user";
|
|
453
|
+
import { Column as Column7, Entity as Entity7, JoinColumn as JoinColumn7, ManyToOne as ManyToOne7 } from "typeorm";
|
|
454
|
+
class UserProfileUpdateEntity extends BaseEntity {
|
|
455
|
+
}
|
|
456
|
+
__legacyDecorateClassTS([
|
|
457
|
+
Column7({ name: "changed_fields", type: "simple-array" }),
|
|
458
|
+
__legacyMetadataTS("design:type", Array)
|
|
459
|
+
], UserProfileUpdateEntity.prototype, "changedFields", undefined);
|
|
460
|
+
__legacyDecorateClassTS([
|
|
461
|
+
Column7({ name: "previous_values", type: "jsonb", nullable: true }),
|
|
462
|
+
__legacyMetadataTS("design:type", typeof Record === "undefined" ? Object : Record)
|
|
463
|
+
], UserProfileUpdateEntity.prototype, "previousValues", undefined);
|
|
464
|
+
__legacyDecorateClassTS([
|
|
465
|
+
Column7({ name: "new_values", type: "jsonb", nullable: true }),
|
|
466
|
+
__legacyMetadataTS("design:type", typeof Record === "undefined" ? Object : Record)
|
|
467
|
+
], UserProfileUpdateEntity.prototype, "newValues", undefined);
|
|
468
|
+
__legacyDecorateClassTS([
|
|
469
|
+
Column7({ name: "update_reason", type: "varchar", length: 255, nullable: true }),
|
|
470
|
+
__legacyMetadataTS("design:type", String)
|
|
471
|
+
], UserProfileUpdateEntity.prototype, "updateReason", undefined);
|
|
472
|
+
__legacyDecorateClassTS([
|
|
473
|
+
Column7({ name: "ip_address", type: "inet", nullable: true }),
|
|
474
|
+
__legacyMetadataTS("design:type", String)
|
|
475
|
+
], UserProfileUpdateEntity.prototype, "ipAddress", undefined);
|
|
476
|
+
__legacyDecorateClassTS([
|
|
477
|
+
Column7({ name: "user_agent", type: "text", nullable: true }),
|
|
478
|
+
__legacyMetadataTS("design:type", String)
|
|
479
|
+
], UserProfileUpdateEntity.prototype, "userAgent", undefined);
|
|
480
|
+
__legacyDecorateClassTS([
|
|
481
|
+
Column7({ name: "requires_verification", type: "boolean", default: false, nullable: true }),
|
|
482
|
+
__legacyMetadataTS("design:type", Boolean)
|
|
483
|
+
], UserProfileUpdateEntity.prototype, "requiresVerification", undefined);
|
|
484
|
+
__legacyDecorateClassTS([
|
|
485
|
+
Column7({
|
|
486
|
+
name: "status",
|
|
487
|
+
type: "enum",
|
|
488
|
+
enum: EProfileUpdateStatus
|
|
489
|
+
}),
|
|
490
|
+
__legacyMetadataTS("design:type", typeof EProfileUpdateStatus === "undefined" ? Object : EProfileUpdateStatus)
|
|
491
|
+
], UserProfileUpdateEntity.prototype, "status", undefined);
|
|
492
|
+
__legacyDecorateClassTS([
|
|
493
|
+
Column7({ name: "applied_at", type: "timestamptz", nullable: true }),
|
|
494
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
495
|
+
], UserProfileUpdateEntity.prototype, "appliedAt", undefined);
|
|
496
|
+
__legacyDecorateClassTS([
|
|
497
|
+
Column7({ name: "metadata", type: "jsonb", nullable: true }),
|
|
498
|
+
__legacyMetadataTS("design:type", typeof Record === "undefined" ? Object : Record)
|
|
499
|
+
], UserProfileUpdateEntity.prototype, "metadata", undefined);
|
|
500
|
+
__legacyDecorateClassTS([
|
|
501
|
+
Column7({ name: "description", type: "text", nullable: true }),
|
|
502
|
+
__legacyMetadataTS("design:type", String)
|
|
503
|
+
], UserProfileUpdateEntity.prototype, "description", undefined);
|
|
504
|
+
__legacyDecorateClassTS([
|
|
505
|
+
ManyToOne7(() => UserEntity, {
|
|
506
|
+
nullable: true,
|
|
507
|
+
eager: false,
|
|
508
|
+
onDelete: "CASCADE"
|
|
509
|
+
}),
|
|
510
|
+
JoinColumn7({ name: "user_id" }),
|
|
511
|
+
__legacyMetadataTS("design:type", typeof IUser === "undefined" ? Object : IUser)
|
|
512
|
+
], UserProfileUpdateEntity.prototype, "user", undefined);
|
|
513
|
+
__legacyDecorateClassTS([
|
|
514
|
+
ManyToOne7(() => VerificationEntity, {
|
|
515
|
+
nullable: true,
|
|
516
|
+
eager: false
|
|
517
|
+
}),
|
|
518
|
+
JoinColumn7({ name: "verification_id" }),
|
|
519
|
+
__legacyMetadataTS("design:type", typeof IVerification === "undefined" ? Object : IVerification)
|
|
520
|
+
], UserProfileUpdateEntity.prototype, "verification", undefined);
|
|
521
|
+
UserProfileUpdateEntity = __legacyDecorateClassTS([
|
|
522
|
+
Entity7({
|
|
523
|
+
name: "user_profile_updates"
|
|
524
|
+
})
|
|
525
|
+
], UserProfileUpdateEntity);
|
|
526
|
+
|
|
527
|
+
// src/entities/user/UserReportEntity.ts
|
|
528
|
+
import { Column as Column8, Entity as Entity8, JoinColumn as JoinColumn8, ManyToOne as ManyToOne8 } from "typeorm";
|
|
529
|
+
class UserReportEntity extends BaseEntity {
|
|
530
|
+
}
|
|
531
|
+
__legacyDecorateClassTS([
|
|
532
|
+
ManyToOne8(() => UserEntity, {
|
|
533
|
+
nullable: true,
|
|
534
|
+
eager: false
|
|
535
|
+
}),
|
|
536
|
+
JoinColumn8({ name: "user_id" }),
|
|
537
|
+
__legacyMetadataTS("design:type", typeof IUser === "undefined" ? Object : IUser)
|
|
538
|
+
], UserReportEntity.prototype, "user", undefined);
|
|
539
|
+
__legacyDecorateClassTS([
|
|
540
|
+
Column8({ name: "user_id", type: "varchar", length: 25, nullable: true }),
|
|
541
|
+
__legacyMetadataTS("design:type", String)
|
|
542
|
+
], UserReportEntity.prototype, "userId", undefined);
|
|
543
|
+
__legacyDecorateClassTS([
|
|
544
|
+
Column8({ name: "reason", type: "varchar", length: 255 }),
|
|
545
|
+
__legacyMetadataTS("design:type", String)
|
|
546
|
+
], UserReportEntity.prototype, "reason", undefined);
|
|
547
|
+
__legacyDecorateClassTS([
|
|
548
|
+
Column8({ name: "description", type: "text", nullable: true }),
|
|
549
|
+
__legacyMetadataTS("design:type", String)
|
|
550
|
+
], UserReportEntity.prototype, "description", undefined);
|
|
551
|
+
__legacyDecorateClassTS([
|
|
552
|
+
Column8({ name: "reported_by", type: "varchar", length: 255, nullable: true }),
|
|
553
|
+
__legacyMetadataTS("design:type", String)
|
|
554
|
+
], UserReportEntity.prototype, "reportedBy", undefined);
|
|
555
|
+
__legacyDecorateClassTS([
|
|
556
|
+
Column8({ name: "reported_by_id", type: "varchar", length: 25, nullable: true }),
|
|
557
|
+
__legacyMetadataTS("design:type", String)
|
|
558
|
+
], UserReportEntity.prototype, "reportedById", undefined);
|
|
559
|
+
UserReportEntity = __legacyDecorateClassTS([
|
|
560
|
+
Entity8({
|
|
561
|
+
name: "users_reports"
|
|
562
|
+
})
|
|
563
|
+
], UserReportEntity);
|
|
564
|
+
|
|
565
|
+
// src/entities/user/UserStatEntity.ts
|
|
566
|
+
import { Column as Column9, Entity as Entity9, JoinColumn as JoinColumn9, ManyToOne as ManyToOne9 } from "typeorm";
|
|
567
|
+
class UserStatEntity extends BaseEntity {
|
|
568
|
+
}
|
|
569
|
+
__legacyDecorateClassTS([
|
|
570
|
+
ManyToOne9(() => UserEntity, {
|
|
571
|
+
nullable: true,
|
|
572
|
+
eager: false
|
|
573
|
+
}),
|
|
574
|
+
JoinColumn9({ name: "user_id" }),
|
|
575
|
+
__legacyMetadataTS("design:type", typeof IUser === "undefined" ? Object : IUser)
|
|
576
|
+
], UserStatEntity.prototype, "user", undefined);
|
|
577
|
+
__legacyDecorateClassTS([
|
|
578
|
+
Column9({ name: "user_id", type: "varchar", length: 25, nullable: true }),
|
|
579
|
+
__legacyMetadataTS("design:type", String)
|
|
580
|
+
], UserStatEntity.prototype, "userId", undefined);
|
|
581
|
+
__legacyDecorateClassTS([
|
|
582
|
+
Column9({ name: "followers_count", type: "int", default: 0, nullable: true }),
|
|
583
|
+
__legacyMetadataTS("design:type", Number)
|
|
584
|
+
], UserStatEntity.prototype, "followersCount", undefined);
|
|
585
|
+
__legacyDecorateClassTS([
|
|
586
|
+
Column9({ name: "following_count", type: "int", default: 0, nullable: true }),
|
|
587
|
+
__legacyMetadataTS("design:type", Number)
|
|
588
|
+
], UserStatEntity.prototype, "followingCount", undefined);
|
|
589
|
+
__legacyDecorateClassTS([
|
|
590
|
+
Column9({ name: "blocked_count", type: "int", default: 0, nullable: true }),
|
|
591
|
+
__legacyMetadataTS("design:type", Number)
|
|
592
|
+
], UserStatEntity.prototype, "blockedCount", undefined);
|
|
593
|
+
__legacyDecorateClassTS([
|
|
594
|
+
Column9({ name: "views_count", type: "int", default: 0, nullable: true }),
|
|
595
|
+
__legacyMetadataTS("design:type", Number)
|
|
596
|
+
], UserStatEntity.prototype, "viewsCount", undefined);
|
|
597
|
+
__legacyDecorateClassTS([
|
|
598
|
+
Column9({ name: "reports_count", type: "int", default: 0, nullable: true }),
|
|
599
|
+
__legacyMetadataTS("design:type", Number)
|
|
600
|
+
], UserStatEntity.prototype, "reportsCount", undefined);
|
|
601
|
+
UserStatEntity = __legacyDecorateClassTS([
|
|
602
|
+
Entity9({
|
|
603
|
+
name: "users_stats"
|
|
604
|
+
})
|
|
605
|
+
], UserStatEntity);
|
|
606
|
+
|
|
607
|
+
// src/entities/user/UserViewedEntity.ts
|
|
608
|
+
import { Column as Column10, Entity as Entity10, JoinColumn as JoinColumn10, ManyToOne as ManyToOne10 } from "typeorm";
|
|
609
|
+
class UserViewedEntity extends BaseEntity {
|
|
610
|
+
}
|
|
611
|
+
__legacyDecorateClassTS([
|
|
612
|
+
ManyToOne10(() => UserEntity, {
|
|
613
|
+
nullable: true,
|
|
614
|
+
eager: false
|
|
615
|
+
}),
|
|
616
|
+
JoinColumn10({ name: "user_id" }),
|
|
617
|
+
__legacyMetadataTS("design:type", typeof IUser === "undefined" ? Object : IUser)
|
|
618
|
+
], UserViewedEntity.prototype, "user", undefined);
|
|
619
|
+
__legacyDecorateClassTS([
|
|
620
|
+
Column10({ name: "user_id", type: "varchar", length: 25, nullable: true }),
|
|
621
|
+
__legacyMetadataTS("design:type", String)
|
|
622
|
+
], UserViewedEntity.prototype, "userId", undefined);
|
|
623
|
+
__legacyDecorateClassTS([
|
|
624
|
+
Column10({ name: "viewed_by", type: "varchar", length: 255, nullable: true }),
|
|
625
|
+
__legacyMetadataTS("design:type", String)
|
|
626
|
+
], UserViewedEntity.prototype, "viewedBy", undefined);
|
|
627
|
+
__legacyDecorateClassTS([
|
|
628
|
+
Column10({ name: "viewed_by_id", type: "varchar", length: 25, nullable: true }),
|
|
629
|
+
__legacyMetadataTS("design:type", String)
|
|
630
|
+
], UserViewedEntity.prototype, "viewedById", undefined);
|
|
631
|
+
UserViewedEntity = __legacyDecorateClassTS([
|
|
632
|
+
Entity10({
|
|
633
|
+
name: "users_viewed"
|
|
634
|
+
})
|
|
635
|
+
], UserViewedEntity);
|
|
636
|
+
|
|
637
|
+
export { UserEntity, AccountEntity, SessionEntity, UserBlockedEntity, UserFollowedEntity, VerificationEntity, UserProfileUpdateEntity, UserReportEntity, UserStatEntity, UserViewedEntity };
|
|
638
|
+
|
|
639
|
+
//# debugId=D5D247DC88DB7D3564756E2164756E21
|