<?php

namespace Database\Factories;

use App\Models\Azmayesh;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\AzmayeshSample>
 */
class AzmayeshSampleFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'azmayesh_id' => Azmayesh::factory(),
            'azmayesh_project_name' => function (array $attributes) {
                return Azmayesh::query()->find($attributes['azmayesh_id'])->project_name;
            },
            'data' => json_encode(['test']),
        ];
    }
}
