feat: Introduce role column to user model

This commit is contained in:
Faruk AYDIN
2023-02-18 14:26:10 +01:00
parent 9953c3c823
commit f8b0ffd39b
3 changed files with 30 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ class User extends Base {
id!: string;
email!: string;
password!: string;
role: string;
connections?: Connection[];
flows?: Flow[];
steps?: Step[];
@@ -25,6 +26,7 @@ class User extends Base {
id: { type: 'string', format: 'uuid' },
email: { type: 'string', format: 'email', minLength: 1, maxLength: 255 },
password: { type: 'string', minLength: 1, maxLength: 255 },
role: { type: 'string', enum: ['admin', 'user'] },
},
};