|
|
@@ -0,0 +1,39 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+use App\Configuration;
|
|
|
+use Illuminate\Database\Migrations\Migration;
|
|
|
+
|
|
|
+use Illuminate\Support\Facades\Auth;
|
|
|
+
|
|
|
+class AddConfigurationsData extends Migration
|
|
|
+{
|
|
|
+ /**
|
|
|
+ * Run the migrations.
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function up()
|
|
|
+ {
|
|
|
+ $time=\Illuminate\Support\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);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Reverse the migrations.
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function down()
|
|
|
+ {
|
|
|
+ Configuration::query()->where('name','价格系数')->delete();
|
|
|
+ Configuration::query()->where('name','询价延时时间')->delete();
|
|
|
+ Configuration::query()->where('name','接单延时时间')->delete();
|
|
|
+ }
|
|
|
+}
|