SaborGestion uses nine Eloquent models located inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Henry4ndrew/saborGestion/llms.txt
Use this file to discover all available pages before exploring further.
app/Models/. Each model extends Illuminate\Database\Eloquent\Model (except User, which extends Authenticatable) and uses the HasFactory trait.
User
Class:App\Models\UserTable:
users (Laravel default)Extends:
Illuminate\Foundation\Auth\User (Authenticatable)
The User model stores restaurant staff accounts. The role field determines which dashboards and resource routes each user can access.
app/Models/User.php
| Property | Details |
|---|---|
$fillable | name, email, password, role |
$hidden | password, remember_token |
casts | email_verified_at → datetime; password → hashed |
| Role helpers | isAdmin(), isMesero(), isCocinero(), isCajero() |
role: admin, mesero, cocinero, cajero.
Producto
Class:App\Models\ProductoTable:
productos (Laravel convention)
Represents a menu item. The activo flag controls whether the product is available for ordering.
app/Models/Producto.php
| Property | Details |
|---|---|
$fillable | nombre, descripcion, precio, categoria, activo |
$casts | precio → decimal:2; activo → boolean |
Inventario
Class:App\Models\InventarioTable:
inventarios (explicit $table)
Tracks raw ingredients and their current stock level. A stock_minimo threshold can be used to trigger low-stock alerts.
app/Models/Inventario.php
| Property | Details |
|---|---|
$table | inventarios |
$fillable | ingrediente, cantidad, unidad, stock_minimo |
$casts | cantidad → decimal:2; stock_minimo → decimal:2 |
Mesa
Class:App\Models\MesaTable:
mesas (Laravel convention)
Represents a physical table in the restaurant. The estado field tracks whether the table is available, occupied, or reserved.
app/Models/Mesa.php
| Property | Details |
|---|---|
$fillable | numero, capacidad, estado |
Pedido
Class:App\Models\PedidoTable:
pedidos (Laravel convention)
An order placed at a table. mesa_id is a foreign key to the mesas table. estado tracks the lifecycle of the order (e.g. pendiente, en preparación, entregado, cancelado).
app/Models/Pedido.php
| Property | Details |
|---|---|
$fillable | mesa_id, cliente, total, estado, fecha |
$casts | total → decimal:2; fecha → datetime |
Comanda
Class:App\Models\ComandaTable:
comandas (Laravel convention)
A line item within a Pedido. Associates a product and quantity with an order, and carries its own estado to track kitchen preparation status independently per item.
app/Models/Comanda.php
| Property | Details |
|---|---|
$fillable | pedido_id, producto_id, cantidad, estado |
Delivery
Class:App\Models\DeliveryTable:
deliveries (Laravel convention)
Delivery metadata linked to a Pedido. Stores the customer’s address, contact phone number, assigned delivery person, and current estado.
app/Models/Delivery.php
| Property | Details |
|---|---|
$fillable | pedido_id, direccion, telefono, repartidor, estado |
Factura
Class:App\Models\FacturaTable:
facturas (Laravel convention)
An invoice generated from a Pedido. Records the total amount, issue date, and payment status.
app/Models/Factura.php
| Property | Details |
|---|---|
$fillable | pedido_id, total, fecha, estado |
$casts | total → decimal:2; fecha → datetime |
Pago
Class:App\Models\PagoTable:
pagos (Laravel convention)
A payment transaction against a Factura. The metodo field records the payment method (e.g. efectivo, tarjeta).
app/Models/Pago.php
| Property | Details |
|---|---|
$fillable | factura_id, monto, metodo, fecha |
$casts | monto → decimal:2; fecha → datetime |
CierreCaja
Class:App\Models\CierreCajaTable:
cierre_cajas (explicit $table)
A daily cash-drawer close record. Summarises total sales split by payment method, with a free-text observaciones field for notes.
app/Models/CierreCaja.php
| Property | Details |
|---|---|
$table | cierre_cajas |
$fillable | fecha, total_ventas, total_efectivo, total_tarjeta, total_otros, observaciones |
$casts | fecha → datetime; all monetary totals → decimal:2 |