This commit is contained in:
gianella
2026-04-04 15:14:28 -03:00
parent 778871809d
commit 956b2469f9
6 changed files with 316 additions and 61 deletions
@@ -13,18 +13,18 @@ return new class extends Migration
{
Schema::create('products', function (Blueprint $table) {
$table->id();
$table->enum('type', ['bike', 'accessory', 'clothing', 'service']);
$table->enum('type', ['bike', 'accessory', 'clothing', 'spare']); // Tipo de producto
//$table->string('name');
//$table->string('sku')->unique()->nullable(); // Código de barras o interno
$table->text('description')->nullable();
$table->text('name')->nullable();
$table->decimal('price', 10, 2); // Precio venta
$table->decimal('cost', 10, 2)->nullable(); // Costo (solo admin)
$table->integer('stock_quantity')->default(0);
$table->integer('min_stock_alert'); // Alerta
$table->integer('stock_quantity')->default(100);
$table->integer('min_stock_alert')->default(5); // Alerta
$table->enum('type', ['bike', 'accessory', 'clothing', 'spare']); // Tipo de producto
$table->string('serial_number')->nullable(); // Solo para bicis
$table->foreignId('suppliers_id')->constrained()->default(1);