chore: create legal and real user data info
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { Exclude } from "class-transformer";
|
||||
import { Column, Entity, JoinTable, ManyToMany, OneToMany, OneToOne } from "typeorm";
|
||||
import { Column, Entity, JoinColumn, JoinTable, ManyToMany, OneToMany, OneToOne } from "typeorm";
|
||||
|
||||
import { LegalUser } from "./legal-user.entity";
|
||||
import { RealUser } from "./real-user.entity";
|
||||
import { Role } from "./role.entity";
|
||||
import { UserGroup } from "./user-group.entity";
|
||||
import { BaseEntity } from "../../../common/entities/base.entity";
|
||||
import { Address } from "../../address/entities/address.entity";
|
||||
import { UserAnnouncement } from "../../announcements/entities/user-announcement.entity";
|
||||
import { Criticism } from "../../criticisms/entities/criticism.entity";
|
||||
import { DanakServiceReview } from "../../danak-services/entities/danak-service-review.entity";
|
||||
@@ -106,6 +107,10 @@ export class User extends BaseEntity {
|
||||
|
||||
@OneToOne(() => LegalUser, (legalUser) => legalUser.user, { cascade: true, nullable: true })
|
||||
legalUser: LegalUser;
|
||||
|
||||
@OneToOne(() => Address, (address) => address.user, { cascade: true, nullable: true })
|
||||
@JoinColumn()
|
||||
address: Address;
|
||||
}
|
||||
|
||||
// @ManyToMany(() => DanakService, (danakService) => danakService.users)
|
||||
|
||||
Reference in New Issue
Block a user