feat(Import members from Dolibarr)
This commit is contained in:
@@ -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');
|
||||
}
|
||||
};
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user