- refactored user_scope to author

- added author_id for future teams implementation
This commit is contained in:
Peter Papp
2021-03-19 11:27:58 +01:00
parent 19a75d2fb1
commit aa51484303
17 changed files with 176 additions and 207 deletions
+2 -14
View File
@@ -32,24 +32,12 @@ class FileFactory extends Factory
'type' => $this->faker->randomElement(
['image', 'file', 'video', 'audio']
),
'user_scope' => $this->faker->randomElement(
['master', 'editor', 'visitor']
'author' => $this->faker->randomElement(
['user', 'member', 'visitor']
),
'created_at' => $this->faker->dateTimeBetween(
$startDate = '-36 months', $endDate = 'now', $timezone = null
),
];
}
/**
* Configure the model factory.
*
* @return $this
*/
public function configure()
{
return $this->afterCreating(function (File $file) {
// TODO: add fake files
});
}
}
+2 -2
View File
@@ -25,8 +25,8 @@ class FolderFactory extends Factory
'id' => $this->faker->uuid,
'user_id' => $this->faker->uuid,
'name' => $this->faker->word,
'user_scope' => $this->faker->randomElement(
['master', 'editor', 'visitor']
'author' => $this->faker->randomElement(
['user', 'member', 'visitor']
),
'created_at' => $this->faker->dateTimeBetween(
$startDate = '-36 months', $endDate = 'now', $timezone = null