mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 14:06:15 +00:00
User management (#185)
This commit is contained in:
@ -16,7 +16,6 @@ class ProjectFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'user_id' => $this->faker->randomNumber(),
|
||||
'name' => $this->faker->name(),
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
|
@ -7,7 +7,6 @@
|
||||
use App\Enums\ServerStatus;
|
||||
use App\Enums\ServerType;
|
||||
use App\Models\Server;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class ServerFactory extends Factory
|
||||
@ -16,11 +15,7 @@ class ServerFactory extends Factory
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
/** @var User $user */
|
||||
$user = User::factory()->create();
|
||||
|
||||
return [
|
||||
'user_id' => $user->id,
|
||||
'name' => $this->faker->name(),
|
||||
'ssh_user' => 'vito',
|
||||
'ip' => $this->faker->ipv4(),
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Enums\UserRole;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
@ -18,6 +19,7 @@ public function definition(): array
|
||||
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
||||
'remember_token' => Str::random(10),
|
||||
'timezone' => 'UTC',
|
||||
'role' => UserRole::ADMIN,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user