10.April 2026

This commit is contained in:
Kevin Adametz 2026-04-10 17:15:27 +02:00
parent a00c42e770
commit f58c709945
208 changed files with 19280 additions and 2914 deletions

View file

@ -0,0 +1,41 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('incentives', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 255);
$table->string('slug', 255)->unique();
$table->text('description')->nullable();
$table->string('image', 255)->nullable()->comment('Statisches Bild Dateiname');
$table->text('terms')->nullable()->comment('Teilnahmebedingungen');
$table->date('qualification_start')->comment('Beginn Qualifikationszeitraum');
$table->date('qualification_end')->comment('Ende Qualifikationszeitraum');
$table->date('calculation_end')->comment('Ende Punkteberechnung (inkl. Verlaengerung)');
$table->unsignedInteger('points_partner_onetime')->default(600)->comment('Einmalpunkte pro Neupartner');
$table->unsignedInteger('points_abo_onetime')->default(400)->comment('Einmalpunkte pro Kundenabo');
$table->unsignedInteger('min_direct_partners')->default(4)->comment('Mindestanzahl direkte Teampartner');
$table->unsignedInteger('min_customer_abos')->default(6)->comment('Mindestanzahl Kundenabos');
$table->unsignedInteger('max_winners')->default(30)->comment('Maximale Anzahl Gewinner');
$table->unsignedTinyInteger('status')->default(0)->index()->comment('0=draft, 1=active, 2=closed');
$table->timestamps();
$table->softDeletes();
});
}
public function down(): void
{
Schema::dropIfExists('incentives');
}
};