Skip to content

Commit

Permalink
Merge pull request hngprojects#572 from hngprojects/feat-user-table
Browse files Browse the repository at this point in the history
Feat user table
  • Loading branch information
incredible-phoenix246 authored Aug 10, 2024
2 parents 187b0f4 + 9bc4d4f commit ab4a4ff
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/models/faq.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand All @@ -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 };
3 changes: 3 additions & 0 deletions src/models/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit ab4a4ff

Please sign in to comment.