entity bugs

This commit is contained in:
2026-01-14 15:19:18 +03:30
parent 209a4fc723
commit aed4a1b333
12 changed files with 35 additions and 24 deletions
+1 -3
View File
@@ -2,7 +2,6 @@ import { Collection, Entity, ManyToMany, OneToMany, PrimaryKey, Property } from
import { BaseEntity } from '../../../common/entities/base.entity';
import { Permission } from './permission.entity';
import { RolePermission } from './rolePermission.entity';
import { Admin } from 'src/modules/admin/entities/admin.entity';
import { ulid } from 'ulid';
@Entity({ tableName: 'roles' })
@@ -22,6 +21,5 @@ export class Role extends BaseEntity {
@ManyToMany({ entity: () => Permission, pivotEntity: () => RolePermission, inversedBy: p => p.roles })
permissions = new Collection<Permission>(this);
@OneToMany(() => Admin, admin => admin.role)
admins = new Collection<Admin>(this);
}