fix: religion relation
This commit is contained in:
parent
c32883f2e8
commit
02878b769b
3 changed files with 37 additions and 21 deletions
|
|
@ -1,5 +1,7 @@
|
|||
import { Entity, Column} from "typeorm";
|
||||
import { Entity, Column, OneToMany } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Profile } from "./Profile";
|
||||
import { ProfileEmployee } from "./ProfileEmployee";
|
||||
|
||||
@Entity("religion")
|
||||
export class Religion extends EntityBase {
|
||||
|
|
@ -10,6 +12,12 @@ export class Religion extends EntityBase {
|
|||
default: null,
|
||||
})
|
||||
name: string;
|
||||
|
||||
@OneToMany(() => Profile, (v) => v.religion)
|
||||
profile: Profile[];
|
||||
|
||||
@OneToMany(() => ProfileEmployee, (v) => v.religion)
|
||||
profileEmployee: ProfileEmployee[];
|
||||
}
|
||||
|
||||
export class CreateReligion {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue