Merge branch 'bryam' of https://github.com/BryamE/ProyectoLauck into giane

This commit is contained in:
gianella
2026-03-13 11:37:52 -03:00
46 changed files with 2310 additions and 368 deletions
@@ -12,7 +12,7 @@ return new class extends Migration
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->enum('role', ['admin', 'employee'])->default('employee')->after('email');
$table->enum('role', ['admin', 'employee', 'guest'])->default('guest')->after('email');
});
}
@@ -24,8 +24,8 @@ return new class extends Migration
$table->integer('stock_quantity')->default(0);
$table->integer('min_stock_alert'); // Alerta
$table->string('rolled')->nullable(); // Solo para bicis
$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);
$table->timestamps();
@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('appointments', function (Blueprint $table) {
// Repuestos estimados (texto simple por ahora)
$table->text('parts_needed')->nullable()->after('problem_description');
// Costo (Presupuesto)
$table->decimal('estimated_cost', 10, 2)->nullable()->after('parts_needed');
// Teléfono de contacto rápido (por si es distinto al del cliente registrado)
$table->string('contact_phone')->nullable()->after('client_id');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('appointments', function (Blueprint $table) {
$table->dropColumn(['parts_needed', 'estimated_cost', 'contact_phone']);
});
}
};