From e847646fb6abe69723b0bf502c2231d0fa3e70f2 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Thu, 26 Sep 2024 17:13:57 +0530 Subject: [PATCH] feat: api_key in user model --- server/src/models/User.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/src/models/User.ts b/server/src/models/User.ts index d5a93a7a..40eb2198 100644 --- a/server/src/models/User.ts +++ b/server/src/models/User.ts @@ -5,6 +5,7 @@ interface UserAttributes { id: number; email: string; password: string; + api_key?: string | null; } // Optional fields for creating a new user @@ -14,6 +15,7 @@ class User extends Model implements User public id!: number; public email!: string; public password!: string; + public api_key!: string | null; } User.init( @@ -35,6 +37,10 @@ User.init( type: DataTypes.STRING, allowNull: false, }, + api_key: { + type: DataTypes.STRING, + allowNull: true, + }, }, { sequelize,