-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathProjectFactory.php
More file actions
56 lines (52 loc) · 1.79 KB
/
Copy pathProjectFactory.php
File metadata and controls
56 lines (52 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
namespace Database\Factories;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class ProjectFactory extends Factory
{
/**
* Define the model's default state.
*/
public function definition(): array
{
$name = $this->faker->sentence($nbWords = 4);
$slug = Str::slug($name, '-');
return [
'name' => $name,
'slug' => $slug,
'color' => $this->faker->rgbCssColor(),
'starred' => false,
'is_public' => false,
'is_deleted' => false,
'is_archived' => false,
'active' => true,
'status' => 'draft',
'process_logs' => null,
'location' => null, // todo: Adjust when location field is provided in nmrXiv
'obfuscationcode' => Str::random(40),
'description' => $this->faker->text(),
'sort_order' => 0,
'type' => null, // todo: Adjust when type field is provided in nmrXiv
'uuid' => Str::uuid(),
'access' => 'restricted',
'access_type' => 'viewer',
'team_id' => 1,
'owner_id' => 1,
'license_id' => rand(1, 10),
'draft_id' => 1,
'fs_id' => null,
'release_date' => null,
'project_photo_path' => null,
'created_at' => Carbon::now()->timestamp,
'updated_at' => Carbon::now()->timestamp,
'doi' => null,
'datacite_schema' => null,
'identifier' => null,
'validation_id' => 1,
'validation_status' => false,
'schema_version' => 'beta', // todo: provide varying values
'internal_status' => null, // todo: provide varying values
];
}
}