generated from liutk/owl-admin-base
35 lines
1.8 KiB
PHP
35 lines
1.8 KiB
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'],
|
|
]);
|
|
// $config = null;
|
|
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()],
|
|
['key' => 'ledger', 'name' => '上报数据', 'config' => $config, 'created_at' => now(), 'updated_at' => now()],
|
|
['key' => 'reimbursement', 'name' => '收支报销', 'config' => $config, 'created_at' => now(), 'updated_at' => now()],
|
|
['key' => 'store_master_commission', 'name' => '店长提成', 'config' => $config, 'created_at' => now(), 'updated_at' => now()],
|
|
['key' => 'employee_promotion', 'name' => '升职申请', 'config' => $config, 'created_at' => now(), 'updated_at' => now()],
|
|
['key' => 'agreement', 'name' => '合同审核', 'config' => $config, 'created_at' => now(), 'updated_at' => now()],
|
|
['key' => 'task_hygiene', 'name' => '清洁卫生', 'config' => $config, 'created_at' => now(), 'updated_at' => now()],
|
|
]);
|
|
}
|
|
}
|