aboutsummaryrefslogtreecommitdiffhomepage
path: root/main/app/sprinkles/account/factories
diff options
context:
space:
mode:
authormarvin-borner@live.com2018-04-16 21:09:05 +0200
committermarvin-borner@live.com2018-04-16 21:09:05 +0200
commitcf14306c2b3f82a81f8d56669a71633b4d4b5fce (patch)
tree86700651aa180026e89a66064b0364b1e4346f3f /main/app/sprinkles/account/factories
parent619b01b3615458c4ed78bfaeabb6b1a47cc8ad8b (diff)
Main merge to user management system - files are now at /main/public/
Diffstat (limited to 'main/app/sprinkles/account/factories')
-rwxr-xr-xmain/app/sprinkles/account/factories/Permissions.php19
-rwxr-xr-xmain/app/sprinkles/account/factories/Roles.php18
-rwxr-xr-xmain/app/sprinkles/account/factories/Users.php23
3 files changed, 60 insertions, 0 deletions
diff --git a/main/app/sprinkles/account/factories/Permissions.php b/main/app/sprinkles/account/factories/Permissions.php
new file mode 100755
index 0000000..591f5fd
--- /dev/null
+++ b/main/app/sprinkles/account/factories/Permissions.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * UserFrosting (http://www.userfrosting.com)
+ *
+ * @link https://github.com/userfrosting/UserFrosting
+ * @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
+ */
+
+use League\FactoryMuffin\Faker\Facade as Faker;
+
+/**
+ * General factory for the Permission Model
+ */
+$fm->define('UserFrosting\Sprinkle\Account\Database\Models\Permission')->setDefinitions([
+ 'slug' => Faker::word(),
+ 'name' => Faker::word(),
+ 'description' => Faker::paragraph(),
+ 'conditions' => Faker::word()
+]);
diff --git a/main/app/sprinkles/account/factories/Roles.php b/main/app/sprinkles/account/factories/Roles.php
new file mode 100755
index 0000000..cdbb5a3
--- /dev/null
+++ b/main/app/sprinkles/account/factories/Roles.php
@@ -0,0 +1,18 @@
+<?php
+/**
+ * UserFrosting (http://www.userfrosting.com)
+ *
+ * @link https://github.com/userfrosting/UserFrosting
+ * @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
+ */
+
+use League\FactoryMuffin\Faker\Facade as Faker;
+
+/**
+ * General factory for the Role Model
+ */
+$fm->define('UserFrosting\Sprinkle\Account\Database\Models\Role')->setDefinitions([
+ 'slug' => Faker::unique()->word(),
+ 'name' => Faker::word(),
+ 'description' => Faker::paragraph()
+]);
diff --git a/main/app/sprinkles/account/factories/Users.php b/main/app/sprinkles/account/factories/Users.php
new file mode 100755
index 0000000..7390c44
--- /dev/null
+++ b/main/app/sprinkles/account/factories/Users.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * UserFrosting (http://www.userfrosting.com)
+ *
+ * @link https://github.com/userfrosting/UserFrosting
+ * @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
+ */
+
+use League\FactoryMuffin\Faker\Facade as Faker;
+
+/**
+ * General factory for the User Model
+ */
+$fm->define('UserFrosting\Sprinkle\Account\Database\Models\User')->setDefinitions([
+ 'user_name' => Faker::unique()->firstNameMale(),
+ 'first_name' => Faker::firstNameMale(),
+ 'last_name' => Faker::firstNameMale(),
+ 'email' => Faker::unique()->email(),
+ 'locale' => 'en_US',
+ 'flag_verified' => 1,
+ 'flag_enabled' => 1,
+ 'password' => Faker::password()
+]);