*/ class SupplierProjectFactory extends Factory { protected $model = SupplierProject::class; public function definition(): array { $platform = fake()->randomElement(['B1', 'B2', 'B3']); // B1 не поддерживает СМС у поставщика (chk_supplier_projects_b1_not_for_sms). $signal = fake()->randomElement($platform === 'B1' ? ['site', 'call'] : ['site', 'call', 'sms']); return [ 'platform' => $platform, 'signal_type' => $signal, 'unique_key' => fake()->unique()->domainName(), 'supplier_external_id' => (string) fake()->numberBetween(1_000_000, 99_999_999), 'current_limit' => 0, 'current_workdays' => [1, 2, 3, 4, 5, 6, 7], 'current_regions' => null, 'sync_status' => 'pending', 'last_synced_at' => null, 'inactive_since' => null, ]; } }