2021-05-03 12:12:26 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Seeders;
|
|
|
|
|
2021-07-26 11:21:58 +00:00
|
|
|
use Carbon\Carbon;
|
2021-05-03 12:12:26 +00:00
|
|
|
use Illuminate\Database\Seeder;
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
|
2021-07-26 11:21:58 +00:00
|
|
|
use App\Models\{Domain,Software,System,Zone};
|
2021-07-16 06:55:26 +00:00
|
|
|
|
2021-05-03 12:12:26 +00:00
|
|
|
class InitialSetupSeeder extends Seeder
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the database seeds.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function run()
|
|
|
|
{
|
|
|
|
DB::table('protocols')->insert([
|
|
|
|
'name'=>'BINKP',
|
|
|
|
'port'=>24554,
|
|
|
|
'active'=>TRUE,
|
|
|
|
]);
|
|
|
|
DB::table('protocols')->insert([
|
|
|
|
'name'=>'EMSI',
|
|
|
|
'port'=>60179,
|
|
|
|
'active'=>TRUE,
|
|
|
|
]);
|
|
|
|
DB::table('software')->insert([
|
|
|
|
'name'=>'Custom',
|
|
|
|
'active'=>TRUE,
|
2021-07-16 06:55:26 +00:00
|
|
|
'type'=>Software::SOFTWARE_MAILER,
|
2021-05-03 12:12:26 +00:00
|
|
|
]);
|
|
|
|
|
2021-07-26 11:21:58 +00:00
|
|
|
$so = new System;
|
|
|
|
$so->forceFill([
|
|
|
|
'name'=>'Clearing Houz - Dev',
|
|
|
|
'sysop'=>'System Sysop',
|
|
|
|
'location'=>'Melbourne, AU',
|
|
|
|
'active'=>TRUE,
|
|
|
|
]);
|
|
|
|
$so->save();
|
|
|
|
|
|
|
|
$do = new Domain;
|
|
|
|
$do->forceFill([
|
2021-05-13 12:40:21 +00:00
|
|
|
'name'=>'private',
|
|
|
|
'active'=>TRUE,
|
2021-07-16 06:55:26 +00:00
|
|
|
'public'=>TRUE,
|
|
|
|
'notes'=>'PrivateNet: Internal Testing Network'
|
2021-05-03 12:12:26 +00:00
|
|
|
]);
|
2021-07-26 11:21:58 +00:00
|
|
|
$do->save();
|
2021-05-03 12:12:26 +00:00
|
|
|
|
2021-07-26 11:21:58 +00:00
|
|
|
$zo = new Zone;
|
|
|
|
$zo->forceFill([
|
2021-05-03 12:12:26 +00:00
|
|
|
'zone_id'=>'10',
|
2022-12-17 05:09:13 +00:00
|
|
|
'default'=>FALSE,
|
2021-05-03 12:12:26 +00:00
|
|
|
'active'=>TRUE,
|
2021-07-26 11:21:58 +00:00
|
|
|
'system_id'=>$so->id,
|
2021-04-01 10:59:15 +00:00
|
|
|
]);
|
2021-07-26 11:21:58 +00:00
|
|
|
$do->zones()->save($zo);
|
2021-04-01 10:59:15 +00:00
|
|
|
|
2021-05-03 12:12:26 +00:00
|
|
|
DB::table('setups')->insert([
|
2021-07-26 11:21:58 +00:00
|
|
|
'system_id'=>$so->id,
|
2021-05-03 12:12:26 +00:00
|
|
|
]);
|
2021-04-01 10:59:15 +00:00
|
|
|
|
|
|
|
DB::table('users')->insert([
|
|
|
|
'name'=>'Deon George',
|
|
|
|
'email'=>'deon@leenooks.net',
|
2021-07-26 11:21:58 +00:00
|
|
|
'email_verified_at'=>Carbon::now(),
|
|
|
|
'admin'=>TRUE,
|
|
|
|
'active'=>TRUE,
|
2021-04-01 10:59:15 +00:00
|
|
|
'password'=>'$2y$10$bJQDLfxnKrh6o5Sa02MZOukXcLTNQiByXSTJ7fTr.kHMpV2wxbG6.',
|
|
|
|
]);
|
2021-08-11 13:45:30 +00:00
|
|
|
|
|
|
|
DB::table('echoareas')->insert([
|
|
|
|
'name'=>'-BAD_AREA',
|
|
|
|
'description'=>'Inbound invalid echomail',
|
|
|
|
'active'=>TRUE,
|
2022-03-11 12:49:15 +00:00
|
|
|
'public'=>TRUE,
|
2021-08-11 13:45:30 +00:00
|
|
|
'domain_id'=>$do->id,
|
|
|
|
]);
|
|
|
|
|
|
|
|
DB::table('fileareas')->insert([
|
|
|
|
'name'=>'-BAD_AREA',
|
|
|
|
'description'=>'Inbound invalid files',
|
|
|
|
'active'=>TRUE,
|
2022-03-11 12:49:15 +00:00
|
|
|
'public'=>TRUE,
|
2021-08-11 13:45:30 +00:00
|
|
|
'domain_id'=>$do->id,
|
|
|
|
]);
|
2021-05-03 12:12:26 +00:00
|
|
|
}
|
|
|
|
}
|