diff --git a/src/models/faq.ts b/src/models/faq.ts index 86932bec..8f570d22 100644 --- a/src/models/faq.ts +++ b/src/models/faq.ts @@ -1,4 +1,10 @@ -import { Entity, PrimaryGeneratedColumn, Column } from "typeorm"; +import { + Entity, + PrimaryGeneratedColumn, + Column, + CreateDateColumn, + UpdateDateColumn, +} from "typeorm"; import ExtendedBaseEntity from "./extended-base-entity"; import { UserRole } from "../enums/userRoles"; @@ -18,6 +24,12 @@ class FAQ extends ExtendedBaseEntity { @Column({ nullable: false, default: UserRole.SUPER_ADMIN }) createdBy: string; + + @CreateDateColumn() + created_at: Date; + + @UpdateDateColumn() + updated_at: Date; } export { FAQ }; diff --git a/src/models/user.ts b/src/models/user.ts index 03dc0d22..ad88e983 100644 --- a/src/models/user.ts +++ b/src/models/user.ts @@ -68,6 +68,9 @@ export class User extends ExtendedBaseEntity { @Column({ nullable: true }) otp: number; + @Column({ default: false }) + is_superadmin: boolean; + @Column({ nullable: true }) otp_expires_at: Date;