fix: add user detail on create member
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
import { Roles } from 'src/configurable/entities/roles.entity';
|
||||
import { Entity, Column, PrimaryGeneratedColumn, ManyToOne } from 'typeorm';
|
||||
import {
|
||||
Entity,
|
||||
Column,
|
||||
PrimaryGeneratedColumn,
|
||||
ManyToOne,
|
||||
OneToOne,
|
||||
} from 'typeorm';
|
||||
import { BaseModel } from '../../config/basemodel.entity';
|
||||
import { hashPassword } from '../../helper/hash_password';
|
||||
import { Partner } from './partner.entity';
|
||||
import { UserDetail } from './user_detail.entity';
|
||||
|
||||
@Entity()
|
||||
export class User extends BaseModel {
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
|
||||
import {
|
||||
Entity,
|
||||
Column,
|
||||
PrimaryGeneratedColumn,
|
||||
OneToOne,
|
||||
ManyToOne,
|
||||
JoinColumn,
|
||||
} from 'typeorm';
|
||||
import { accountType } from '../../helper/enum-list';
|
||||
import { User } from './user.entity';
|
||||
|
||||
@Entity()
|
||||
export class UserDetail {
|
||||
@@ -9,14 +17,10 @@ export class UserDetail {
|
||||
@Column()
|
||||
name: string;
|
||||
|
||||
@Column()
|
||||
first_name: string;
|
||||
|
||||
@Column()
|
||||
phone_number: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
})
|
||||
type: accountType;
|
||||
@OneToOne(() => User)
|
||||
@JoinColumn()
|
||||
user: User;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user