Profilfeld users.agency_name für Übermittler-Attribution

Erster Schritt des Umbaus Agentur-Attribution → User-Profil
(dev/agentur-attribution/entwicklungsplan.md, A1): Die Übermittler-
Angabe wird Profil-Eigenschaft des einliefernden Accounts statt
Pseudo-Firma vom Typ „agency".

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-07-08 09:20:32 +00:00
parent 881a583bec
commit e457e7a81c
3 changed files with 37 additions and 0 deletions

View file

@ -41,6 +41,11 @@ class UserFactory extends Factory
]);
}
public function withAgency(string $agencyName = 'Muster Presseverteiler'): static
{
return $this->state(['agency_name' => $agencyName]);
}
public function inactive(): static
{
return $this->state(['is_active' => false]);

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::table('users', function (Blueprint $table) {
// Übermittler-Angabe („übermittelt von …") als Profil-Eigenschaft
// des einliefernden Accounts — ersetzt die Legacy-Pseudo-Firmen
// vom Typ „agency" (siehe dev/agentur-attribution/entwicklungsplan.md).
$table->string('agency_name', 190)->nullable()->after('name');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('agency_name');
});
}
};