feat: infrastructure assets management with warranty tracking and EAN lookup integration
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?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('assets', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('nom');
|
||||
$table->string('type'); // Serveur, Switch, NAS, Baie, etc.
|
||||
$table->string('marque')->nullable();
|
||||
$table->string('modele')->nullable();
|
||||
$table->string('numero_serie')->nullable();
|
||||
$table->string('emplacement')->nullable();
|
||||
$table->foreignId('commune_id')->nullable()->constrained()->nullOnDelete();
|
||||
$table->date('date_achat')->nullable();
|
||||
$table->date('date_fin_garantie')->nullable();
|
||||
$table->enum('statut', ['en_service', 'hors_service', 'en_reparation', 'stock'])->default('en_service');
|
||||
$table->text('notes')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('assets');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user