12345678910111213141516171819202122232425262728293031 |
- <?php
- namespace Database\Factories;
- use App\Models\Asset;
- use App\Models\Enums\LibraryACL;
- use App\Models\Enums\LibraryType;
- use Illuminate\Database\Eloquent\Factories\Factory;
- use Illuminate\Support\Facades\Auth;
- /**
- * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Library>
- */
- class LibraryFactory extends Factory
- {
- /**
- * Define the model's default state.
- *
- * @return array<string, mixed>
- */
- public function definition(): array
- {
- return [
- "name" => fake()->text(10),
- "acl" => LibraryACL::CUSTOM->value,
- "asset_id" => Asset::factory()->create(),
- "company_id" => Auth::user()->company_id,
- "type" => LibraryType::ASSET->value,
- ];
- }
- }
|