Browse Source

字段修改与新增

duqinya 6 years ago
parent
commit
1f09409ab0

+ 1 - 1
app/Models/ConfigPickupNode.php

@@ -11,7 +11,7 @@ class ConfigPickupNode extends BaseModel
      * 可被批量赋值的字段
      * @var array
      */
-    protected $fillable = ['pickup_group_id','store_ids','city_name','city_id','name','address','longitude','latitude','pickup_code','work_time','manager_name','manager_mobile','store_ids','receive_type'];
+    protected $fillable = ['pickup_group_id','store_ids','city_name','city_id','distance','name','address','longitude','latitude','pickup_code','work_time','manager_name','manager_mobile','store_ids','receive_type'];
 
     //一对多关联储存方式表
     public function configStoreType()

+ 32 - 0
database/migrations/2019_04_25_103653_update_config_pickup_node_table.php

@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class UpdateConfigPickupNodeTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('config_pickup_node', function (Blueprint $table) {
+            $table->integer('distance')->comment('距离');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('config_pickup_node', function (Blueprint $table) {
+            $table->dropColumn(['distance']);
+        });
+    }
+}

+ 36 - 0
database/migrations/2019_04_25_143536_add_bjcity_id_config_province_table.php

@@ -0,0 +1,36 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddBjcityIdConfigProvinceTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('config_province', function (Blueprint $table) {
+            $table->renameColumn('name', 'area_name');
+            $table->renameColumn('id', 'bjcity_id',20)->comment('地区id');
+            $table->string('area_code',50)->nullable()->comment('地区编码');
+            $table->string('city_code',50)->comment('城市编码');
+            $table->string('center',50)->comment('城市中心点(即:经纬度坐标)');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('config_province', function (Blueprint $table) {
+            $table->dropColumn('bjcity_id','area_name','area_code','city_code','center');
+        });
+    }
+}

+ 32 - 0
database/migrations/2019_04_26_035256_update_express_type_config_city_management_table.php

@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class UpdateExpressTypeConfigCityManagementTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('config_city_management', function (Blueprint $table) {
+            $table->string('express_type',50)->comment('快递方式:0.快递;1.自提')->change();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('config_city_management', function (Blueprint $table) {
+            //
+        });
+    }
+}