fix: user detail relations
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
import {
|
||||
Entity,
|
||||
Column,
|
||||
PrimaryGeneratedColumn,
|
||||
OneToOne,
|
||||
ManyToOne,
|
||||
Entity,
|
||||
JoinColumn,
|
||||
OneToOne,
|
||||
PrimaryGeneratedColumn,
|
||||
} from 'typeorm';
|
||||
import { accountType } from '../../helper/enum-list';
|
||||
import { User } from './user.entity';
|
||||
|
||||
@Entity()
|
||||
@@ -20,7 +18,7 @@ export class UserDetail {
|
||||
@Column()
|
||||
phone_number: string;
|
||||
|
||||
@OneToOne(() => User)
|
||||
@OneToOne(() => User, (user) => user.userDetail)
|
||||
@JoinColumn()
|
||||
user: User;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user