2023-07-27 21:28:00 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
|
|
|
|
|
class CreateWaybillsTable extends Migration
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Run the migrations.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function up()
|
|
|
|
|
{
|
|
|
|
|
if (Schema::hasTable('waybills')) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Schema::create('waybills', function (Blueprint $table) {
|
|
|
|
|
$table->bigIncrements('id');
|
|
|
|
|
$table->integer('shop_id');
|
|
|
|
|
$table->string('request_id')->default('');
|
|
|
|
|
$table->text('encryptedData')->nullable();
|
|
|
|
|
$table->string('signature')->default('');
|
|
|
|
|
$table->string('templateUrl');
|
|
|
|
|
$table->string('ver')->default('');
|
|
|
|
|
$table->string('waybill_code')->default('');
|
|
|
|
|
$table->string('object_id', 32);
|
|
|
|
|
$table->integer('key')->default(0);
|
|
|
|
|
|
|
|
|
|
$table->string('sender_country');
|
|
|
|
|
$table->string('sender_province');
|
|
|
|
|
$table->string('sender_city');
|
|
|
|
|
$table->string('sender_district');
|
|
|
|
|
$table->string('sender_detail');
|
|
|
|
|
$table->string('sender_name');
|
|
|
|
|
$table->integer('sender_mobile');
|
|
|
|
|
|
|
|
|
|
$table->string('recipient_country')->default('');
|
|
|
|
|
$table->string('recipient_province');
|
|
|
|
|
$table->string('recipient_city');
|
|
|
|
|
$table->string('recipient_district');
|
|
|
|
|
$table->string('recipient_detail');
|
|
|
|
|
$table->string('recipient_name');
|
2023-07-28 15:35:47 +08:00
|
|
|
$table->string('recipient_mobile', 16);
|
2023-07-27 21:28:00 +08:00
|
|
|
|
2023-07-28 15:35:47 +08:00
|
|
|
$table->string('user_id');
|
2023-07-27 21:28:00 +08:00
|
|
|
$table->string('wp_code');
|
|
|
|
|
$table->string('order_channels_type')->default('PDD');
|
|
|
|
|
|
|
|
|
|
$table->string('order_sn');
|
2023-07-29 17:57:36 +08:00
|
|
|
$table->integer('order_id');
|
2023-07-27 21:28:00 +08:00
|
|
|
$table->text('items');
|
2023-07-28 15:35:47 +08:00
|
|
|
$table->tinyInteger('cancel')->default(0);
|
2023-07-27 21:28:00 +08:00
|
|
|
|
|
|
|
|
$table->timestamps();
|
|
|
|
|
|
|
|
|
|
$table->index('object_id');
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Reverse the migrations.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function down()
|
|
|
|
|
{
|
|
|
|
|
Schema::dropIfExists('waybills');
|
|
|
|
|
}
|
|
|
|
|
}
|