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
commit46f77f8e380b3e377e72c4bdab3d888b903d00af (patch)
tree600b52ce6365e015e9e4a2f0de112b576c62f862 /util
parentForgot the openapi.json change. (diff)
downloadserver-46f77f8e380b3e377e72c4bdab3d888b903d00af.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,