MODEL RELATIONSHIP EXPORT - 2026-01-02 04:40:12 ======================================== ### Model: Client ### App\Models\Client ................................................................................................................................ Database ................................................................................................................................... mysql Table .................................................................................................................................... clients Attributes ........................................................................................................................... type / cast id increments, unique ...................................................................................................... bigint unsigned / int contact_person_name fillable ........................................................................................................ varchar(255) company_name fillable ............................................................................................................... varchar(255) company_address fillable ........................................................................................................... text / string email nullable, fillable ............................................................................................................ varchar(255) phone nullable, fillable ............................................................................................................ varchar(255) created_at nullable ......................................................................................................... timestamp / datetime updated_at nullable ......................................................................................................... timestamp / datetime display_name ............................................................................................................................ accessor Relations ........................................................................................................................................ invoices HasMany .............................................................................................................. App\Models\Invoice Events ........................................................................................................................................... Observers ........................................................................................................................................ ---------------------------------------- ### Model: Company ### App\Models\Company ............................................................................................................................... Database ................................................................................................................................... mysql Table .................................................................................................................................. companies Attributes ........................................................................................................................... type / cast id increments, unique ...................................................................................................... bigint unsigned / int name fillable ....................................................................................................................... varchar(255) address fillable ................................................................................................................... text / string logo nullable, fillable ............................................................................................................. varchar(255) email fillable ...................................................................................................................... varchar(255) phone fillable ...................................................................................................................... varchar(255) bank_account_name fillable .......................................................................................................... varchar(255) bank_account_number fillable ........................................................................................................ varchar(255) bank_name fillable .................................................................................................................. varchar(255) terms_conditions nullable, fillable ................................................................................................ text / string created_at nullable ......................................................................................................... timestamp / datetime updated_at nullable ......................................................................................................... timestamp / datetime logo_url ................................................................................................................................ accessor Relations ........................................................................................................................................ invoices HasMany .............................................................................................................. App\Models\Invoice Events ........................................................................................................................................... Observers ........................................................................................................................................ ---------------------------------------- ### Model: Invoice ### App\Models\Invoice ............................................................................................................................... Database ................................................................................................................................... mysql Table ................................................................................................................................... invoices Attributes ........................................................................................................................... type / cast id increments, unique ...................................................................................................... bigint unsigned / int client_id fillable ............................................................................................................... bigint unsigned company_id fillable .............................................................................................................. bigint unsigned invoice_number unique, fillable ..................................................................................................... varchar(255) invoice_date fillable ................................................................................................................ date / date grand_total fillable ................................................................................................... decimal(10,2) / decimal:2 page_number fillable ......................................................................................................................... int status fillable ............................................................................................ enum('draft','sent','paid','overdue') notes nullable, fillable .................................................................................................................... text created_at nullable ......................................................................................................... timestamp / datetime updated_at nullable ......................................................................................................... timestamp / datetime quotation_id nullable ............................................................................................................ bigint unsigned formatted_grand_total ................................................................................................................... accessor Relations ........................................................................................................................................ client BelongsTo ............................................................................................................... App\Models\Client company BelongsTo ............................................................................................................. App\Models\Company lineItems HasMany ..................................................................................................... App\Models\InvoiceLineItem quotation BelongsTo ......................................................................................................... App\Models\Quotation Events ........................................................................................................................................... Observers ........................................................................................................................................ creating ................................................................................................................................. Closure ---------------------------------------- ### Model: InvoiceLineItem ### App\Models\InvoiceLineItem ....................................................................................................................... Database ................................................................................................................................... mysql Table ......................................................................................................................... invoice_line_items Attributes ........................................................................................................................... type / cast id increments, unique ...................................................................................................... bigint unsigned / int invoice_id fillable .............................................................................................................. bigint unsigned item_number fillable ......................................................................................................................... int item_name fillable .................................................................................................................. varchar(255) description nullable, fillable .............................................................................................................. text price_per_unit fillable ................................................................................................ decimal(10,2) / decimal:2 uom fillable ........................................................................................................................ varchar(255) quantity fillable ...................................................................................................... decimal(10,2) / decimal:2 total fillable ......................................................................................................... decimal(10,2) / decimal:2 created_at nullable ......................................................................................................... timestamp / datetime updated_at nullable ......................................................................................................... timestamp / datetime formatted_price_per_unit ................................................................................................................ accessor formatted_total ......................................................................................................................... accessor Relations ........................................................................................................................................ invoice BelongsTo ............................................................................................................. App\Models\Invoice Events ........................................................................................................................................... Observers ........................................................................................................................................ saving ................................................................................................................................... Closure ---------------------------------------- ### Model: Quotation ### App\Models\Quotation ............................................................................................................................. Database ................................................................................................................................... mysql Table ................................................................................................................................. quotations Attributes ........................................................................................................................... type / cast id increments, unique ...................................................................................................... bigint unsigned / int client_id fillable ............................................................................................................... bigint unsigned company_id fillable .............................................................................................................. bigint unsigned quotation_number unique, fillable ................................................................................................... varchar(255) quotation_date fillable .............................................................................................................. date / date valid_until_date fillable ............................................................................................................ date / date grand_total fillable ................................................................................................... decimal(10,2) / decimal:2 page_number fillable ......................................................................................................................... int status fillable ...................................................... enum('draft','sent','approved','rejected','revised','converted_to_invoice') notes nullable, fillable .................................................................................................................... text terms_conditions nullable, fillable ......................................................................................................... text sent_at nullable, fillable .................................................................................................. timestamp / datetime approved_at nullable, fillable .............................................................................................. timestamp / datetime rejected_at nullable, fillable .............................................................................................. timestamp / datetime created_at nullable ......................................................................................................... timestamp / datetime updated_at nullable ......................................................................................................... timestamp / datetime formatted_grand_total ................................................................................................................... accessor is_expired .............................................................................................................................. accessor Relations ........................................................................................................................................ client BelongsTo ............................................................................................................... App\Models\Client company BelongsTo ............................................................................................................. App\Models\Company lineItems HasMany ................................................................................................... App\Models\QuotationLineItem invoice HasMany ............................................................................................................... App\Models\Invoice Events ........................................................................................................................................... Observers ........................................................................................................................................ creating ................................................................................................................................. Closure ---------------------------------------- ### Model: QuotationLineItem ### App\Models\QuotationLineItem ..................................................................................................................... Database ................................................................................................................................... mysql Table ....................................................................................................................... quotation_line_items Attributes ........................................................................................................................... type / cast id increments, unique ...................................................................................................... bigint unsigned / int quotation_id fillable ............................................................................................................ bigint unsigned item_number fillable ......................................................................................................................... int item_name fillable .................................................................................................................. varchar(255) description nullable, fillable .............................................................................................................. text price_per_unit fillable ................................................................................................ decimal(10,2) / decimal:2 uom fillable ........................................................................................................................ varchar(255) quantity fillable ...................................................................................................... decimal(10,2) / decimal:2 total fillable ......................................................................................................... decimal(10,2) / decimal:2 created_at nullable ......................................................................................................... timestamp / datetime updated_at nullable ......................................................................................................... timestamp / datetime formatted_price_per_unit ................................................................................................................ accessor formatted_total ......................................................................................................................... accessor Relations ........................................................................................................................................ quotation BelongsTo ......................................................................................................... App\Models\Quotation Events ........................................................................................................................................... Observers ........................................................................................................................................ saving ................................................................................................................................... Closure ---------------------------------------- ### Model: Supplier ### App\Models\Supplier .............................................................................................................................. Database ................................................................................................................................... mysql Table .................................................................................................................................. suppliers Attributes ........................................................................................................................... type / cast id increments, unique ...................................................................................................... bigint unsigned / int name fillable ....................................................................................................................... varchar(255) codename unique, fillable ........................................................................................................... varchar(255) contact_person nullable, fillable ................................................................................................... varchar(255) contact_number nullable, fillable ................................................................................................... varchar(255) location nullable, fillable ......................................................................................................... varchar(255) notes nullable, fillable .................................................................................................................... text created_at nullable ......................................................................................................... timestamp / datetime updated_at nullable ......................................................................................................... timestamp / datetime total_quotes ............................................................................................................................ accessor active_quotes ........................................................................................................................... accessor display_name ............................................................................................................................ accessor Relations ........................................................................................................................................ priceRecords HasMany .............................................................................................. App\Models\SupplierPriceRecord activePriceRecords HasMany ........................................................................................ App\Models\SupplierPriceRecord latestPriceRecord HasOne .......................................................................................... App\Models\SupplierPriceRecord Events ........................................................................................................................................... Observers ........................................................................................................................................ ---------------------------------------- ### Model: SupplierPriceRecord ### App\Models\SupplierPriceRecord ................................................................................................................... Database ................................................................................................................................... mysql Table ..................................................................................................................... supplier_price_records Attributes ........................................................................................................................... type / cast id increments, unique ...................................................................................................... bigint unsigned / int supplier_id fillable ............................................................................................................. bigint unsigned item_type fillable .................................................................................................................. varchar(255) item_description fillable ................................................................................................................... text quantity fillable ...................................................................................................... decimal(10,2) / decimal:2 uom fillable ........................................................................................................................ varchar(255) width nullable, fillable ............................................................................................... decimal(10,2) / decimal:2 height nullable, fillable .............................................................................................. decimal(10,2) / decimal:2 dimension_unit nullable, fillable .................................................................................................... varchar(10) unit_price fillable .................................................................................................... decimal(10,2) / decimal:2 total_price fillable ................................................................................................... decimal(10,2) / decimal:2 postage_option fillable .................................................................................. enum('included','add_on','self_pickup') postage_price nullable, fillable ....................................................................................... decimal(10,2) / decimal:2 self_pickup_location nullable, fillable ............................................................................................. varchar(255) size_display nullable .................................................................................................... varchar(255) / accessor postage_display nullable ................................................................................................. varchar(255) / accessor quoted_at fillable ................................................................................................................... date / date notes nullable, fillable .................................................................................................................... text is_active fillable .......................................................................................................... tinyint(1) / boolean created_at nullable ......................................................................................................... timestamp / datetime updated_at nullable ......................................................................................................... timestamp / datetime unit_price_formatted appended ........................................................................................................... accessor total_price_formatted appended .......................................................................................................... accessor short_description appended .............................................................................................................. accessor quantity_with_uom ....................................................................................................................... accessor display_summary ......................................................................................................................... accessor Relations ........................................................................................................................................ supplier BelongsTo ........................................................................................................... App\Models\Supplier Events ........................................................................................................................................... Observers ........................................................................................................................................ saving ................................................................................................................................... Closure creating ................................................................................................................................. Closure ---------------------------------------- ### Model: User ### App\Models\User .................................................................................................................................. Database ................................................................................................................................... mysql Table ...................................................................................................................................... users Attributes ........................................................................................................................... type / cast id increments, unique ...................................................................................................... bigint unsigned / int name fillable ....................................................................................................................... varchar(255) email unique, fillable .............................................................................................................. varchar(255) email_verified_at nullable .................................................................................................. timestamp / datetime password fillable, hidden .................................................................................................. varchar(255) / hashed remember_token nullable, hidden ..................................................................................................... varchar(100) created_at nullable ......................................................................................................... timestamp / datetime updated_at nullable ......................................................................................................... timestamp / datetime Relations ........................................................................................................................................ notifications MorphMany ............................................................................ Illuminate\Notifications\DatabaseNotification Events ........................................................................................................................................... Observers ........................................................................................................................................ ----------------------------------------