[products] [categories] [orders] created_at updated_at [order_items] id (PK) order_id (FK) product_id (FK) quantity unit_price total_price created_at updated_at [invoices] id (PK) order_id (FK) client_id (FK) invoice_number issue_date due_date subtotal taxes total status -- pagado, pendiente, vencido pdf_url created_at updated_at [payments] created_at [tickets] [ticket_messages] id (PK) ticket_id (FK) sender_type -- client, agent sender_id message created_at [notifications_log] id (PK) client_id (FK) channel -- email, whatsapp, telegram type -- factura, pedido, ticket, recordatorio status -- enviado, fallido message sent_at created_at [purchases] id (PK) supplier_id (FK) branch_id (FK) status total_cost created_at [purchase_items] id (PK) purchase_id (FK) product_id (FK) quantity unit_cost total_cost created_at php artisan make:model Client -a php artisan make:model Branche -a php artisan make:model Product -a php artisan make:model Categorie -a php artisan make:model Order -a php artisan make:model Invoice -a php artisan make:model Payment -a php artisan make:model Ticket -a php artisan make:model Purchase -a php artisan make:model Supplier -a order_items ticket_messages notifications_log purchase_items php artisan make:migration create_order_items_table --create=order_items php artisan make:migration create_ticket_messages_table --create=ticket_messages php artisan make:migration create_purchase_items_table --create=purchase_items php artisan make:migration create_notifications_log_table --create=notifications_log php artisan make:migration create_ticket_attachments_table --create=ticket_attachments