summary refs log tree commit diff
path: root/util
diff options
context:
space:
mode:
authorIratu <me@iratu.pro>2022-02-16 22:00:13 +0000
committerErkin Alp Güney <erkinalp9035@gmail.com>2022-02-18 19:50:11 +0300
commit903ce169a17cc82f5a22cb5814d5a59f5812c25f (patch)
treea742fb1d37a56191bb9e8abb8041cf243fd68f69 /util
parentForgot the openapi.json change. (diff)
downloadserver-903ce169a17cc82f5a22cb5814d5a59f5812c25f.tar.xz
changed user.premium_since to also load from the database.
Diffstat (limited to 'util')
-rw-r--r--util/src/entities/User.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/util/src/entities/User.ts b/util/src/entities/User.ts
index f157ac39..1d18c838 100644
--- a/util/src/entities/User.ts
+++ b/util/src/entities/User.ts
@@ -16,6 +16,7 @@ export enum PublicUserEnum {
 	banner,
 	bio,
 	bot,
+	premium_since,
 }
 export type PublicUserKeys = keyof typeof PublicUserEnum;
 
@@ -110,6 +111,9 @@ export class User extends BaseClass {
 	@Column()
 	created_at: Date; // registration date
 
+	@Column({ nullable: true })
+	premium_since: Date; // premium date
+
 	@Column({ select: false })
 	verified: boolean; // if the user is offically verified
 
@@ -246,6 +250,7 @@ export class User extends BaseClass {
 			id: Snowflake.generate(),
 			bot: false,
 			system: false,
+			premium_since: new Date(),
 			desktop: false,
 			mobile: false,
 			premium: true,