feat(Import members from Dolibarr)

This commit is contained in:
2025-11-15 17:09:56 +01:00
parent de5e81fe22
commit f796f2c658
7 changed files with 195 additions and 49 deletions

View File

@@ -0,0 +1,31 @@
<?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('member_types', function (Blueprint $table) {
$table->id();
$table->string('identifier')->unique();
$table->string('name');
$table->string('description')->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('member_types');
}
};

View File

@@ -18,6 +18,8 @@ return new class extends Migration
// User
$table->foreignId('user_id')->nullable()->constrained('users')->onDelete('set null');
$table->string('dolibarr_id')->nullable();
// Keycloak
$table->string('keycloak_id')->nullable();
@@ -33,6 +35,9 @@ return new class extends Migration
// Nature
$table->enum('nature', ['physical', 'legal'])->default('physical');
// Type
$table->unsignedBigInteger('type_id')->nullable();
// Group
$table->unsignedBigInteger('group_id')->nullable();
@@ -40,6 +45,7 @@ return new class extends Migration
$table->string('lastname')->nullable();
$table->string('firstname')->nullable();
$table->string('email');
$table->string('retzien_email')->nullable();
$table->string('company')->nullable();
$table->date('date_of_birth')->nullable();
@@ -54,6 +60,9 @@ return new class extends Migration
// Membership type
$table->boolean('public_membership')->default(false);
// Others
$table->string('website_url')->nullable();
$table->timestamps();
$table->softDeletes();
});

View File

@@ -19,8 +19,14 @@ return new class extends Migration
$table->date('start_date')->nullable();
$table->date('end_date')->nullable();
$table->enum('status', ['active', 'expired', 'pending'])->default('pending');
$table->date('validation_date')->nullable();
$table->string('payment_method')->nullable();
$table->decimal('amount', 10, 2)->default(0);
$table->enum('payment_status', ['paid', 'unpaid', 'partial'])->default('unpaid');
$table->longText('note_public')->nullable();
$table->longText('note_private')->nullable();
$table->string('dolibarr_id')->nullable();
$table->string('dolibarr_user_id')->nullable();
$table->timestamps();
$table->softDeletes();
});