create and change code

This commit is contained in:
2025-09-07 14:25:10 +03:30
parent 4594415cec
commit c64fc22ed3
9 changed files with 138 additions and 70 deletions

View File

@@ -25,17 +25,13 @@ class HarimHistoryFactory extends Factory
'previous_state_name' => function (array $attributes) {
return HarimStates::query()->find($attributes['state_id'])->name;
},
'current_state_id' => HarimState::factory(),
'current_state_name' => function (array $attributes) {
return HarimState::query()->find($attributes['state_id'])->name;
},
'action_id' => HarimAction::factory(),
'action_name' => function (array $attributes) {
return HarimAction::query()->find($attributes['state_id'])->name;
},
'expert_id' => User::factory(),
'expert_description' => $this->fake()->text,
'previous_data' => json_encode(['fake']),
];
}
}