Commit 3cc04a3c authored by Lorenzo Trujillo Rojas's avatar Lorenzo Trujillo Rojas
Browse files

Se agregó la relación entre el usuario y sus códigos de reseteo

parent 93a031a7
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
import { UserResetCode } from 'src/auth/user/entities/user-reset-code.entity';
import { Category } from 'src/category/entities/category.entity';
import { Entity, Column, ManyToMany, JoinTable, PrimaryColumn } from 'typeorm';
import { Entity, Column, ManyToMany, JoinTable, PrimaryColumn, OneToMany } from 'typeorm';

@Entity()
export class User {
@@ -21,4 +22,7 @@ export class User {

  @Column()
  password: string;

  @OneToMany(() => UserResetCode, resetCode => resetCode.user)
  resetCodes: UserResetCode[];
}