add index to tables

This commit is contained in:
2026-04-09 09:31:20 +03:30
parent 8f6dbc17d3
commit 36d231eb0d
12 changed files with 25 additions and 13 deletions
@@ -1,10 +1,11 @@
import { Entity, ManyToOne, OptionalProps, Property } from '@mikro-orm/core';
import { Entity, Index, ManyToOne, OptionalProps, Property } from '@mikro-orm/core';
import { Product } from 'src/modules/product/entities/product.entity';
import { BaseEntity } from 'src/common/entities/base.entity';
import { Request } from './request.entity';
import { IAttachment, IField } from '../interface/request.interface';
@Entity({ tableName: 'request_items' })
@Index({ properties: ['request'] })
export class RequestItem extends BaseEntity {
[OptionalProps]?: 'createdAt' | 'deletedAt';