25 lines
636 B
PHP
25 lines
636 B
PHP
<?php
|
|||
|
|
|
||
|
|
namespace Database\Factories;
|
||
|
|
|
||
|
|
use App\Models\Asset;
|
||
|
|
use App\Models\VideoProject;
|
||
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||
|
|
|
||
|
|
class AssetFactory extends Factory
|
||
|
|
{
|
||
|
|
protected $model = Asset::class;
|
||
|
|
|
||
|
|
public function definition(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'video_project_id' => VideoProject::factory(),
|
||
|
|
'type' => fake()->randomElement(Asset::TYPES),
|
||
|
|
'disk_path' => 'video-projects/'.fake()->uuid().'.bin',
|
||
|
|
'mime_type' => 'application/octet-stream',
|
||
|
|
'size_bytes' => fake()->numberBetween(1000, 5_000_000),
|
||
|
|
'version' => 1,
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|