add index
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Collection, Entity, ManyToMany, OneToMany, ManyToOne, Property } from '@mikro-orm/core';
|
||||
import { Collection, Entity, Index, ManyToMany, OneToMany, ManyToOne, Property } from '@mikro-orm/core';
|
||||
import { BaseEntity } from '../../../common/entities/base.entity';
|
||||
import { Permission } from './permission.entity';
|
||||
import { Restaurant } from '../../restaurants/entities/restaurant.entity';
|
||||
@@ -6,6 +6,7 @@ import { RolePermission } from './rolePermission.entity';
|
||||
import { AdminRole } from 'src/modules/admin/entities/adminRole.entity';
|
||||
|
||||
@Entity({ tableName: 'roles' })
|
||||
@Index({ properties: ['restaurant'] })
|
||||
export class Role extends BaseEntity {
|
||||
@Property()
|
||||
name!: string;
|
||||
|
||||
Reference in New Issue
Block a user