mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
fix: database migrations FK relations.
fix: database columns indexing.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { IVendor } from "interfaces";
|
||||
import TenantRepository from "./TenantRepository";
|
||||
|
||||
|
||||
@@ -18,7 +19,7 @@ export default class VendorRepository extends TenantRepository {
|
||||
|
||||
/**
|
||||
* Retrieve the bill that associated to the given vendor id.
|
||||
* @param {number} vendorId
|
||||
* @param {number} vendorId - Vendor id.
|
||||
*/
|
||||
getBills(vendorId: number) {
|
||||
const { Bill } = this.models;
|
||||
@@ -29,16 +30,17 @@ export default class VendorRepository extends TenantRepository {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Retrieve all the given vendors.
|
||||
* @param {numner[]} vendorsIds
|
||||
* @return {IVendor}
|
||||
*/
|
||||
vendors(vendorsIds: number[]) {
|
||||
vendors(vendorsIds: number[]): IVendor[] {
|
||||
const { Contact } = this.models;
|
||||
return Contact.query().modifier('vendor').whereIn('id', vendorsIds);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Retrieve vendors with associated bills.
|
||||
* @param {number[]} vendorIds
|
||||
*/
|
||||
vendorsWithBills(vendorIds: number[]) {
|
||||
|
||||
Reference in New Issue
Block a user