import { Admin } from 'src/admin/entities/admin.entity';
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from 'typeorm';

@Entity()
export class AdminResetCode {
  @PrimaryGeneratedColumn()
  id: number;

  @ManyToOne(() => Admin, (admin) => admin.resetCodes)
  admin: Admin;

  @Column()
  code: string;

  @Column()
  expirationDate: Date;
}
