remove compose file to another repo

This commit is contained in:
2025-05-05 15:30:11 +03:30
parent 02ef3ae2ad
commit 3b739558ee
179 changed files with 130 additions and 341 deletions

View File

@@ -0,0 +1,44 @@
<?php
namespace Database\Factories;
use App\Models\Category;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<\App\Models\Call>
*/
class CallFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'telephone_id' => $this->faker->numerify('tel-####'),
'caller_phone_number' => '09' . $this->faker->unique()->randomNumber(9, true),
'operator_id' => User::factory(),
'operator_username' => function (array $attributes) {
return User::find($attributes['operator_id'])->username;
},
'operator_full_name' => function (array $attributes) {
return User::find($attributes['operator_id'])->full_name;
},
'description' => $this->faker->text,
'category_id' => Category::factory(),
'category_name' => function (array $attributes) {
return Category::find($attributes['category_id'])->category_name;
},
'subcategory_id' => function (array $attributes) {
return Category::find($attributes['category_id'])->subcategory_id;
},
'subcategory_name' => function (array $attributes) {
return Category::find($attributes['category_id'])->subcategory_name;
},
];
}
}