update inv entity

This commit is contained in:
2026-02-18 23:15:45 +03:30
parent 1bef27364d
commit 6b2aeddedd
4 changed files with 24 additions and 17 deletions
@@ -1,6 +1,5 @@
import { Entity, Enum, Index, ManyToOne, OptionalProps, Property } from '@mikro-orm/core';
import { Entity, ManyToOne, OptionalProps, Property } from '@mikro-orm/core';
import { Product } from 'src/modules/product/entities/product.entity';
import { IField } from 'src/modules/order/interface/order.interface';
import { BaseEntity } from 'src/common/entities/base.entity';
import { Invoice } from './invoice.entity';
@@ -15,8 +14,6 @@ export class InvoiceItem extends BaseEntity {
@ManyToOne(() => Product)
product!: Product;
@Property({ type: 'json', nullable: true })
attributes?: IField[]
@Property({ type: 'int' })
quantity!: number;
@@ -49,8 +46,15 @@ export class InvoiceItem extends BaseEntity {
@Property({ type: 'text', nullable: true })
description?: string;
@Property({ type: 'string', nullable: true })
paymentMethod?: string;
@Property({ nullable: true, columnType: 'timestamptz' })
confirmedAt?: Date;
@Property({ type: 'json', nullable: true })
attachments?: string[]
}