Merge pull request #1598 from omnivore-app/fix/admin-portal-status

Add the status to the admin user model
This commit is contained in:
Jackson Harper 2023-01-02 20:11:36 +08:00 committed by GitHub
commit 060dbc44ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,6 +40,11 @@ export const registerDatabase = async (): Promise<Connection> => {
return connection
}
export enum StatusType {
Active = 'ACTIVE',
Pending = 'PENDING',
}
@Entity({ name: 'admin_user' })
export class AdminUser extends BaseEntity {
@PrimaryGeneratedColumn()
@ -69,6 +74,9 @@ export class User extends BaseEntity {
@Column({ type: 'timestamp' })
public updated_at!: Date
@Column({ type: 'enum', enum: StatusType })
status!: StatusType
@OneToMany(() => UserArticle, (ua) => ua.user)
articles!: UserArticle[]
}