mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
fix: database migrations FK relations.
fix: database columns indexing.
This commit is contained in:
@@ -22,17 +22,20 @@ export default class PaymentReceive extends TenantModel {
|
||||
static get relationMappings() {
|
||||
const PaymentReceiveEntry = require('models/PaymentReceiveEntry');
|
||||
const AccountTransaction = require('models/AccountTransaction');
|
||||
const Customer = require('models/Customer');
|
||||
const Contact = require('models/Contact');
|
||||
const Account = require('models/Account');
|
||||
|
||||
return {
|
||||
customer: {
|
||||
relation: Model.BelongsToOneRelation,
|
||||
modelClass: Customer.default,
|
||||
modelClass: Contact.default,
|
||||
join: {
|
||||
from: 'payment_receives.customerId',
|
||||
to: 'customers.id',
|
||||
to: 'contacts.id',
|
||||
},
|
||||
filter(query) {
|
||||
query.where('contact_type', 'Customer');
|
||||
}
|
||||
},
|
||||
|
||||
depositAccount: {
|
||||
|
||||
Reference in New Issue
Block a user