add index

This commit is contained in:
2025-12-11 18:37:50 +03:30
parent a54e8eb9f3
commit 49ec05b410
12 changed files with 42 additions and 11 deletions
@@ -1,8 +1,10 @@
import { Collection, Entity, OneToMany, Property } from '@mikro-orm/core';
import { Collection, Entity, Index, OneToMany, Property } from '@mikro-orm/core';
import { BaseEntity } from '../../../common/entities/base.entity';
import { Delivery } from '../../delivery/entities/delivery.entity';
@Entity({ tableName: 'restaurants' })
@Index({ properties: ['isActive'] })
@Index({ properties: ['slug', 'isActive'] })
export class Restaurant extends BaseEntity {
// --- اطلاعات پایه ---
@Property()