You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
2.2 KiB
75 lines
2.2 KiB
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
class AdminConfigSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
//
|
|
DB::table('admin_configs')->insert($this->data());
|
|
}
|
|
|
|
protected function data(): array
|
|
{
|
|
$created_at = date("Y-m-d H:i:s", time());
|
|
return [
|
|
[
|
|
'title' => '车场配置',
|
|
'name' => 'parking_lot',
|
|
'content' => json_encode([
|
|
[
|
|
'name' => 'parking_lot_id',
|
|
'value' => 666
|
|
],
|
|
[
|
|
'name' => 'parking_lot_sum',
|
|
'value' => 1000
|
|
],
|
|
[
|
|
'name' => 'parking_lot_image_path',
|
|
'value' => '/home/wwwroot/test/saas-8'
|
|
],
|
|
[
|
|
'name' => 'zombie_car_parking_duration',
|
|
'value' => 10
|
|
],
|
|
[
|
|
'name' => 'numberplate_fuzzy_search',
|
|
'value' => 1
|
|
],
|
|
[
|
|
'name' => 'automatically_clear_photo_cycle',
|
|
'value' => 10
|
|
],
|
|
[
|
|
'name' => 'report_data_switch',
|
|
'value' => 1
|
|
],
|
|
[
|
|
'name' => 'third_parking_lot_id',
|
|
'value' => 666
|
|
],
|
|
[
|
|
'name' => 'report_api_url',
|
|
'value' => 'https://xg-saas-8.icecloud-car.cc'
|
|
],
|
|
[
|
|
'name' => 'report_cycle',
|
|
'value' => 60
|
|
],
|
|
|
|
]),
|
|
'status' => 1,
|
|
'created_at' => $created_at
|
|
]
|
|
];
|
|
}
|
|
}
|
|
|