mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Added factories
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
2b2853a183
commit
d27a025347
|
@ -105,4 +105,51 @@ class ActionlogFactory extends Factory
|
|||
];
|
||||
});
|
||||
}
|
||||
|
||||
public function filesUploaded()
|
||||
{
|
||||
return $this->state(function () {
|
||||
|
||||
return [
|
||||
'created_at' => $this->faker->dateTimeBetween('-1 years', 'now', date_default_timezone_get()),
|
||||
'action_type' => 'uploaded',
|
||||
'item_type' => User::class,
|
||||
'filename' => $this->faker->unixTime('now'),
|
||||
];
|
||||
});
|
||||
}
|
||||
|
||||
public function acceptedSignature()
|
||||
{
|
||||
return $this->state(function () {
|
||||
|
||||
$asset = Asset::factory()->create();
|
||||
|
||||
return [
|
||||
'created_at' => $this->faker->dateTimeBetween('-1 years', 'now', date_default_timezone_get()),
|
||||
'action_type' => 'accepted',
|
||||
'item_id' => $asset->id,
|
||||
'item_type' => Asset::class,
|
||||
'target_type' => User::class,
|
||||
'accept_signature' => $this->faker->unixTime('now'),
|
||||
];
|
||||
});
|
||||
}
|
||||
|
||||
public function acceptedEula()
|
||||
{
|
||||
return $this->state(function () {
|
||||
|
||||
$asset = Asset::factory()->create();
|
||||
|
||||
return [
|
||||
'created_at' => $this->faker->dateTimeBetween('-1 years', 'now', date_default_timezone_get()),
|
||||
'action_type' => 'accepted',
|
||||
'item_id' => $asset->id,
|
||||
'item_type' => Asset::class,
|
||||
'target_type' => User::class,
|
||||
'filename' => $this->faker->unixTime('now'),
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue