Initial commit with contrats and domaines modules
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?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('contrats', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('titre');
|
||||
$table->text('description')->nullable();
|
||||
$table->foreignId('fournisseur_id')->constrained('fournisseurs')->onDelete('cascade');
|
||||
$table->foreignId('service_id')->constrained('services')->onDelete('cascade');
|
||||
$table->date('date_debut')->nullable();
|
||||
$table->date('date_echeance');
|
||||
$table->enum('statut', ['actif', 'a_renouveler', 'expire', 'resilie'])->default('actif');
|
||||
$table->decimal('montant', 10, 2)->nullable();
|
||||
$table->integer('preavis_jours')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('contrats');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user