feat: infrastructure assets management with warranty tracking and EAN lookup integration
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?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::create('licences', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('contrat_id')->nullable()->constrained()->nullOnDelete();
|
||||
$table->foreignId('fournisseur_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('commune_id')->nullable()->constrained()->nullOnDelete();
|
||||
$table->string('nom');
|
||||
$table->text('cle_licence')->nullable();
|
||||
$table->integer('nombre_sieges_total')->default(1);
|
||||
$table->integer('nombre_sieges_utilises')->default(0);
|
||||
$table->date('date_acquisition')->nullable();
|
||||
$table->date('date_expiration')->nullable();
|
||||
$table->enum('type_licence', ['perpétuelle', 'abonnement'])->default('abonnement');
|
||||
$table->enum('statut', ['active', 'expirée', 'résiliée'])->default('active');
|
||||
$table->text('notes')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('licences');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user