mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Co-authored-by: Aditya Tripathi <aditya@climactic.co>
30 lines
769 B
PHP
30 lines
769 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Enums\ImageScanStatus;
|
|
use App\Models\Application;
|
|
use App\Models\ImageScan;
|
|
use App\Models\Server;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends Factory<ImageScan>
|
|
*/
|
|
class ImageScanFactory extends Factory
|
|
{
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'server_id' => Server::factory(),
|
|
'image_id' => 'sha256:'.fake()->sha256(),
|
|
'resource_type' => (new Application)->getMorphClass(),
|
|
'resource_id' => fake()->unique()->numberBetween(1, 1_000_000),
|
|
'image_ref' => 'nginx:1.27',
|
|
'status' => ImageScanStatus::Completed,
|
|
'builds_image' => false,
|
|
'scanned_at' => now(),
|
|
];
|
|
}
|
|
}
|