BUB-7 Automobili: Creato funzionalità principali. TODO: Visualizzazione lista operazioni e Implementazione importi in movimenti

This commit is contained in:
2023-03-30 16:01:39 +02:00
parent 9fa9b6681c
commit 9f0ee469c8
17 changed files with 366 additions and 32 deletions

View File

@@ -17,7 +17,7 @@ class CreateOperazionesTable extends Migration
$table->id();
$table->timestamps();
$table->unsignedBigInteger('fk_auto_id');
$table->foreign('fk_auto_id')->references('id')->on('autos');
$table->foreign('fk_auto_id')->references('id')->on('autos')->cascadeOnDelete();
$table->date('data');
$table->bigInteger('km');
$table->double('importo',10,2);

View File

@@ -19,8 +19,8 @@ class CreateRifornimentosTable extends Migration
$table->double('eurolitro',10,2);
$table->double('litri',10,2);
$table->string('distributore',255);
$table->unsignedBigInteger('fk_operazione');
$table->foreign('fk_operazione')->references('id')->on('operaziones');
$table->unsignedBigInteger('fk_operazione_id');
$table->foreign('fk_operazione_id')->references('id')->on('operaziones')->cascadeOnDelete();
});
}

View File

@@ -16,6 +16,9 @@ class CreateManutenzionesTable extends Migration
Schema::create('manutenziones', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->longText('descrizione');
$table->unsignedBigInteger('fk_operazione_id');
$table->foreign('fk_operazione_id')->references('id')->on('operaziones')->cascadeOnDelete();
});
}

View File

@@ -16,6 +16,12 @@ class CreateRevisionesTable extends Migration
Schema::create('revisiones', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->unsignedBigInteger('fk_operazione_id');
$table->foreign('fk_operazione_id')->references('id')->on('operaziones')->cascadeOnDelete();
$table->longText('descrizione');
$table->string('centrorevisione',255);
$table->boolean('superata');
$table->date('dataproxrevisione');
});
}

View File

@@ -16,6 +16,9 @@ class CreateAccessorisTable extends Migration
Schema::create('accessoris', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->unsignedBigInteger('fk_operazione_id');
$table->foreign('fk_operazione_id')->references('id')->on('operaziones')->cascadeOnDelete();
$table->longText('descrizione');
});
}