This commit is contained in:
2026-02-21 12:18:29 +03:30
parent f682465d4c
commit 1acae30b75
6 changed files with 31 additions and 9 deletions
@@ -27,8 +27,8 @@ export class InvoiceItem extends BaseEntity {
@Property({
type: 'int',
columnType: 'int GENERATED ALWAYS AS (COALESCE(unit_price, 0) * quantity) STORED',
persist: false,
// columnType: 'int GENERATED ALWAYS AS (COALESCE(unit_price, 0) * quantity) STORED',
// persist: false,
nullable: true
})
subTotal!: number;
@@ -42,17 +42,14 @@ export class InvoiceItem extends BaseEntity {
@Property({
type: 'int',
nullable: true,
columnType: 'int GENERATED ALWAYS AS ((COALESCE(unit_price, 0) * quantity) - COALESCE(discount, 0)) STORED',
persist: false
// columnType: 'int GENERATED ALWAYS AS ((COALESCE(unit_price, 0) * quantity) - COALESCE(discount, 0)) STORED',
// persist: false
})
total!: number;
@Property({ type: 'text', nullable: true })
description?: string;
@Property({ type: 'string', nullable: true })
paymentMethod?: string;
@Property({ nullable: true, columnType: 'timestamptz' })
confirmedAt?: Date;