konto optionen

This commit is contained in:
salam committed 2025-09-22 10:02:08 +02:00
1 parent 47edd31030
commit e5ea920579
25 files changed
+309 -178

No files matched your search

@@ -25,6 +25,7 @@ return new class extends Migration
$table->string('konto_country')->nullable();
$table->string('konto_phone')->nullable();
$table->string('konto_uid_number')->nullable();
$table->string('konto_option_id')->default(1);
$table->boolean('konto_agb_akzeptiert')->default(false);
$table->timestamps();
});
@@ -11,12 +11,13 @@ return new class extends Migration
*/
public function up(): void
{
Schema::create('kontooptionens', function (Blueprint $table) {
Schema::create('konto_options', function (Blueprint $table) {
$table->id();
$table->string('name')->nullable();
$table->string('description')->nullable();
$table->integer('number_user')->default(1);
$table->integer('number_gutachter')->default(1);
$table->integer('payment_plan_id')->default(1);
$table->timestamps();
});
}
@@ -26,6 +27,6 @@ return new class extends Migration
*/
public function down(): void
{
Schema::dropIfExists('kontooptionens');
Schema::dropIfExists('konto_options');
}
};
@@ -0,0 +1,29 @@
<?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('payment_plans', function (Blueprint $table) {
$table->id();
$table->string('name')->nullable();
$table->string('description')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('payment_plans');
}
};
+1 -1
View File
@@ -14,7 +14,7 @@ class DatabaseSeeder extends Seeder
$this->call([
KontoSeeder::class,
RolesAndPermissionsSeeder::class,
KontooptionenSeeder::class,
KontoOptionSeeder::class,
]);
}
}
+31
View File
@@ -0,0 +1,31 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class KontoOptionSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$sql = "INSERT INTO `payment_plans` (`id`, `name`)
VALUES
('1', 'Pro Gutachten'),
('2', 'Monatlich'),
('3', 'Jährlich');
";
DB::unprepared($sql);
$sql = "INSERT INTO `konto_options` (`id`, `name`, `description`, `number_user`, `number_gutachter`, `payment_plan_id`, `created_at`, `updated_at`)
VALUES
('1', 'Basic', 'Basis Version für einen Benutzer und einem Gutacher.', '1', '1', '1', NULL, NULL),
('2', 'Erweitert', 'Premium Version für 3 Benutzer und 3 Gutacher.', '3', '3', '2', NULL, NULL),
('3', 'Premium', 'Premium Version für fünf Benutzer und fünf Gutacher. \nUnbegrenzte Anzahl der Gutachten.', '5', '5', '3', NULL, NULL);
";
DB::unprepared($sql);
}
}
-22
View File
@@ -1,22 +0,0 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class KontooptionenSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$sql = "INSERT INTO `kontooptionens` (`id`, `name`, `description`, `number_user`, `number_gutachter`)
VALUES
('1', 'Basic', 'Basis Version mit einem Benutzer und einem Gutacher.',1,1),
('2', 'Premium', 'Premium Version mit fünf Benutzer und fünf Gutacher.',5,5);
";
DB::unprepared($sql);
}
}