-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmanagedinstalls_factory.php
40 lines (36 loc) · 1.46 KB
/
managedinstalls_factory.php
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
<?php
/** @var \Illuminate\Database\Eloquent\Factory $factory */
$factory->define(Managedinstalls_model::class, function (Faker\Generator $faker) {
$type = $faker->randomElement(['munki', 'applesus']);
switch ($type) {
case 'munki':
$installs = [
["chrome", "Google Chrome"],
["firefox", "Firefox"],
["bcm", "Bitcoin Miner 2000"],
["spotify", "Spotify"],
["slack", "Slack"],
["finalcutpro", "Final Cut Pro"],
["discord", "Discord"],
];
break;
default:
$installs = [
["jkhsdf-111", "Security update"],
["jkhsdf-343", "Security update"],
["jkhsdf-332", "Supplemental update"],
["jkhsdf-445", "Supplemental supplemental update"],
];
break;
}
list($name, $display_name) = $faker->randomElement($installs);
return [
'name' => $name,
'display_name' => $display_name,
'version' => $faker->randomElement(['10.12.3', '9.3.1', '4.5.12', '10.1.1']) ,
'size' => $faker->numberBetween(1000000, 10000000),
'installed' => $faker->numberBetween(1000000, 10000000),
'status' => $faker->randomElement(['install_failed', 'install_succeeded', 'installed', 'pending_install', 'pending_removal', 'removed', 'uninstall_failed', 'uninstalled']),
'type' => $type,
];
});