mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-27 18:19:48 +00:00
Add withDateSessionMixin for proper timestamp handling and fix models to return empty timestamps array when database tables don't have created_at/updated_at columns. This prevents ORM insert/update errors. Models updated: - Branch, Role, RolePermission, ViewColumn, ViewRole - InventoryAdjustment, InventoryAdjustmentEntry, InventoryTransactionMeta - BillLandedCostEntry, CreditNote, CreditNoteAppliedInvoice, RefundCreditNote - PaymentReceived, SaleInvoice, SaleReceipt, Item, ItemEntry - RefundVendorCredit, VendorCreditAppliedBill - ItemWarehouseQuantity, Warehouse, WarehouseTransfer, WarehouseTransferEntry - Setting, TenantMetadataModel, TenantUser Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
27 lines
535 B
TypeScript
27 lines
535 B
TypeScript
import { BaseModel } from '@/models/Model';
|
|
// import TenantModel from 'models/TenantModel';
|
|
// import Auth from './Auth';
|
|
|
|
export class Setting extends BaseModel {
|
|
/**
|
|
* Table name
|
|
*/
|
|
static get tableName() {
|
|
return 'settings';
|
|
}
|
|
|
|
get timestamps() {
|
|
return [];
|
|
}
|
|
|
|
/**
|
|
* Extra metadata query to query with the current authenticate user.
|
|
* @param {Object} query
|
|
*/
|
|
// static extraMetadataQuery(query) {
|
|
// if (Auth.isLogged()) {
|
|
// query.where('user_id', Auth.userId());
|
|
// }
|
|
// }
|
|
}
|