fix: bill
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Cascade, Collection, Entity, EntityRepositoryType, Enum, ManyToOne, OneToMany } from "@mikro-orm/core";
|
||||
import { Cascade, Collection, Entity, EntityRepositoryType, Enum, ManyToOne, OneToMany, Property } from "@mikro-orm/core";
|
||||
|
||||
import { BaseEntity } from "../../../common/entities/base.entity";
|
||||
import { Business } from "../../businesses/entities/business.entity";
|
||||
@@ -17,5 +17,10 @@ export class Bill extends BaseEntity {
|
||||
@OneToMany(() => Invoice, (invoice) => invoice.bill, { cascade: [Cascade.PERSIST, Cascade.REMOVE], orphanRemoval: true })
|
||||
invoices = new Collection<Invoice>(this);
|
||||
|
||||
/** Set by BillsRepository.getBillsList; not persisted. */
|
||||
@Property({ persist: false })
|
||||
invoiceCount?: number;
|
||||
|
||||
|
||||
[EntityRepositoryType]?: BillsRepository;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user