mirror of
https://github.com/koel/koel
synced 2024-12-11 21:22:28 +00:00
31 lines
856 B
PHP
31 lines
856 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Values\LicenseInstance;
|
|
use App\Values\LicenseMeta;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Str;
|
|
|
|
class LicenseFactory extends Factory
|
|
{
|
|
/** @return array<mixed> */
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'key' => Str::uuid()->toString(),
|
|
'hash' => Str::random(32),
|
|
'instance' => LicenseInstance::make(
|
|
id: Str::uuid()->toString(),
|
|
name: 'Koel Plus',
|
|
createdAt: now(),
|
|
),
|
|
'meta' => LicenseMeta::make(
|
|
customerId: $this->faker->numberBetween(1, 1000),
|
|
customerName: $this->faker->name(),
|
|
customerEmail: $this->faker->email()
|
|
),
|
|
'expires_at' => null,
|
|
];
|
|
}
|
|
}
|