<?php

use Carbon\Carbon;
use Illuminate\Database\Seeder;
use App\Configuration;
use Illuminate\Support\Facades\Auth;

class ConfigurationSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $time=Carbon::now()->toDateTimeString();
        $configurations = [];
        $conf_one=['name'=>'价格系数','description'=>'采购管理价格系数','operator'=>Auth::user()['id'],'created_at'=>$time,'updated_at'=>$time];
        $conf_two=['name'=>'询价延时时间','description'=>'报价需在询价发起延时时间之内有效','operator'=>Auth::user()['id'],'created_at'=>$time,'updated_at'=>$time];
        $conf_three=['name'=>'接单延时时间','description'=>'接单需在询价发起延时时间之内有效','operator'=>Auth::user()['id'],'created_at'=>$time,'updated_at'=>$time];
        $configurations[]=$conf_one;
        $configurations[]=$conf_two;
        $configurations[]=$conf_three;
        Configuration::query()->insert($configurations);
    }
}
