add: member by superrior

This commit is contained in:
ilham
2021-12-10 01:02:33 +07:00
parent 09c84f2cf5
commit 77d9a95d8a
6 changed files with 56 additions and 34 deletions

View File

@@ -1,9 +1,5 @@
import { Roles } from 'src/configurable/entities/roles.entity';
import {
Entity,
Column,
PrimaryGeneratedColumn, ManyToOne,
} from 'typeorm';
import { Entity, Column, PrimaryGeneratedColumn, ManyToOne } from 'typeorm';
import { BaseModel } from '../../config/basemodel.entity';
import { hashPassword } from '../../helper/hash_password';
@@ -33,7 +29,7 @@ export class User extends BaseModel {
},
)
superior: User;
@ManyToOne(
() => {
return Roles;