generated from liutk/owl-admin-base
28 lines
1019 B
PHP
28 lines
1019 B
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\Workflow;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class WorkflowSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
$now = now();
|
|
$config = json_encode([
|
|
["sort" => 1, "type" => "user", "user" => 1, "title" => "员工", "value" => 1, "subTitle" => "Admin"],
|
|
]);
|
|
Workflow::truncate();
|
|
Workflow::insert([
|
|
['key' => 'employee_sign_repair', 'name' => '补卡申请', 'config' => $config, 'created_at' => now(), 'updated_at' => now()],
|
|
['key' => 'holiday_apply', 'name' => '请假申请', 'config' => $config, 'created_at' => now(), 'updated_at' => now()],
|
|
['key' => 'overtime_apply', 'name' => '加班申请', 'config' => $config, 'created_at' => now(), 'updated_at' => now()],
|
|
['key' => 'offical_business', 'name' => '出差报备', 'config' => $config, 'created_at' => now(), 'updated_at' => now()],
|
|
]);
|
|
}
|
|
}
|