import { ADMIN_ROLE } from 'src/enum/admin-role.enum';
import { UserStatus } from 'src/enum/user-status.enum';
import { Entity, Column, PrimaryColumn } from 'typeorm';

@Entity()
export class Admin {
  @PrimaryColumn()
  email: string;

  @Column()
  name: string;

  @Column()
  lastName: string;

  @Column({
    type: 'enum',
    enum: ADMIN_ROLE,
    default: ADMIN_ROLE.ADMIN,
  })
  role: string;

  @Column()
  password: string;

  @Column({
    type: 'enum',
    enum: UserStatus,
    default: 'active',
  })
  status: UserStatus = UserStatus.ACTIVE;
}
