db optimize

This commit is contained in:
2026-04-07 16:59:50 +03:30
parent 87d0ea3792
commit 61ecfcf329
8 changed files with 7 additions and 12 deletions
@@ -4,8 +4,8 @@ import { Delivery } from '../../delivery/entities/delivery.entity';
import { PlanEnum } from '../interface/plan.interface';
@Entity({ tableName: 'restaurants' })
@Index({ properties: ['isActive'] })
@Index({ properties: ['slug', 'isActive'] })
@Index({ properties: ['slug'] })
export class Restaurant extends BaseEntity {
// --- اطلاعات پایه ---
@Property()
@@ -1,7 +1,8 @@
import { Entity, Property } from '@mikro-orm/core';
import { Entity, Index, Property } from '@mikro-orm/core';
import { BaseEntity } from '../../../common/entities/base.entity';
@Entity({ tableName: 'schedules' })
@Index({ properties: ['restId'] })
export class Schedule extends BaseEntity {
@Property({ type: 'int' })
weekDay!: number;