add index to tables
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Collection, Entity, ManyToOne, OptionalProps, Property, OneToMany, Opt } from '@mikro-orm/core';
|
||||
import { Collection, Entity, ManyToOne, OptionalProps, Property, OneToMany, Opt, Index } from '@mikro-orm/core';
|
||||
import { Product } from 'src/modules/product/entities/product.entity';
|
||||
import { BaseEntity } from 'src/common/entities/base.entity';
|
||||
import { Invoice } from './invoice.entity';
|
||||
@@ -6,6 +6,7 @@ import { Order } from 'src/modules/order/entities/order.entity';
|
||||
|
||||
|
||||
@Entity({ tableName: 'invoice_items' })
|
||||
@Index({ properties: ['invoice'] })
|
||||
export class InvoiceItem extends BaseEntity {
|
||||
[OptionalProps]?: 'createdAt' | 'deletedAt' | 'discount' | 'description' | 'confirmedAt';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user