From c18e186589d3a55dd99f9616592c73538952b69a Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Fri, 15 Jan 2021 17:45:52 -0700 Subject: [PATCH] start porting over factories to new layout --- database/factories/LocationFactory.php | 26 +++++++++++++++ database/factories/ModelFactory.php | 2 -- database/factories/NodeFactory.php | 26 +++++++++++++++ database/factories/ServerFactory.php | 46 ++++++++++++++++++++++++++ database/factories/UserFactory.php | 26 +++++++++++++++ 5 files changed, 124 insertions(+), 2 deletions(-) create mode 100644 database/factories/LocationFactory.php create mode 100644 database/factories/NodeFactory.php create mode 100644 database/factories/ServerFactory.php create mode 100644 database/factories/UserFactory.php diff --git a/database/factories/LocationFactory.php b/database/factories/LocationFactory.php new file mode 100644 index 00000000..47f5304d --- /dev/null +++ b/database/factories/LocationFactory.php @@ -0,0 +1,26 @@ + Uuid::uuid4()->toString(), + 'uuidShort' => str_random(8), + 'name' => $this->faker->firstName, + 'description' => implode(' ', $this->faker->sentences()), + 'skip_scripts' => 0, + 'suspended' => 0, + 'memory' => 512, + 'swap' => 0, + 'disk' => 512, + 'io' => 500, + 'cpu' => 0, + 'oom_disabled' => 0, + 'installed' => 1, + 'database_limit' => null, + 'allocation_limit' => null, + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + ]; + } +} diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php new file mode 100644 index 00000000..7cdcb626 --- /dev/null +++ b/database/factories/UserFactory.php @@ -0,0 +1,26 @@ +