更新代码
This commit is contained in:
39
vendor/rulong/order/database/migrations/2018_10_26_000000_create_order_details_table.php
vendored
Normal file
39
vendor/rulong/order/database/migrations/2018_10_26_000000_create_order_details_table.php
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateOrderDetailsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('order_details', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->integer('order_id')->unsigned()->index('order_id');
|
||||
$table->integer('item_id')->unsigned()->comment('商品编号');
|
||||
$table->string('item_type');
|
||||
$table->integer('number')->unsigned()->comment('数量');
|
||||
$table->decimal('price', 20, 3)->unsigned()->comment('单价');
|
||||
$table->dateTime('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('order_details');
|
||||
}
|
||||
|
||||
}
|
||||
41
vendor/rulong/order/database/migrations/2018_10_26_000000_create_order_expresses_table.php
vendored
Normal file
41
vendor/rulong/order/database/migrations/2018_10_26_000000_create_order_expresses_table.php
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateOrderExpressesTable extends Migration
|
||||
{
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('order_expresses', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('order_id')->unsigned()->index('order_id');
|
||||
$table->string('name', 32)->nullable();
|
||||
$table->string('mobile', 32)->nullable();
|
||||
$table->string('address')->nullable();
|
||||
$table->string('company', 32)->nullable()->comment('物流公司');
|
||||
$table->string('number', 32)->nullable()->comment('物流单号');
|
||||
$table->dateTime('deliver_at')->nullable()->comment('发货时间');
|
||||
$table->dateTime('receive_at')->nullable()->comment('签收时间');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('order_expresses');
|
||||
}
|
||||
|
||||
}
|
||||
39
vendor/rulong/order/database/migrations/2018_10_26_000000_create_order_logs_table.php
vendored
Normal file
39
vendor/rulong/order/database/migrations/2018_10_26_000000_create_order_logs_table.php
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateOrderLogsTable extends Migration
|
||||
{
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('order_logs', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('order_id')->unsigned()->index('order_id');
|
||||
$table->integer('user_id')->unsigned()->default(0);
|
||||
$table->string('user_type')->nullable();
|
||||
$table->string('state');
|
||||
$table->string('status');
|
||||
$table->text('logs', 65535)->nullable();
|
||||
$table->dateTime('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('order_logs');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateOrderRefundExpressesTable extends Migration
|
||||
{
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('order_refund_expresses', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('refund_id')->unsigned()->index('refund_id');
|
||||
$table->string('company', 32)->nullable();
|
||||
$table->string('number', 32)->nullable();
|
||||
$table->dateTime('deliver_at')->nullable()->comment('发货时间');
|
||||
$table->dateTime('receive_at')->nullable()->comment('收到时间');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('order_refund_expresses');
|
||||
}
|
||||
|
||||
}
|
||||
40
vendor/rulong/order/database/migrations/2018_10_26_000000_create_order_refund_items_table.php
vendored
Normal file
40
vendor/rulong/order/database/migrations/2018_10_26_000000_create_order_refund_items_table.php
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateOrderRefundItemsTable extends Migration
|
||||
{
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('order_refund_items', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('refund_id')->unsigned()->comment('退款单ID');
|
||||
$table->integer('order_id')->unsigned()->comment('订单ID');
|
||||
$table->integer('order_detail_id')->unsigned()->comment('订单详情ID');
|
||||
$table->integer('item_id')->unsigned()->comment('产品ID');
|
||||
$table->string('item_type');
|
||||
$table->integer('number')->unsigned()->comment('退货数量');
|
||||
$table->decimal('price', 20, 3)->unsigned();
|
||||
$table->dateTime('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('order_refund_items');
|
||||
}
|
||||
|
||||
}
|
||||
41
vendor/rulong/order/database/migrations/2018_10_26_000000_create_order_refunds_table.php
vendored
Normal file
41
vendor/rulong/order/database/migrations/2018_10_26_000000_create_order_refunds_table.php
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateOrderRefundsTable extends Migration
|
||||
{
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('order_refunds', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('order_id')->unsigned()->comment('关联订单id');
|
||||
$table->string('orderid', 32)->unique('orderid')->comment('退款单号');
|
||||
$table->decimal('refund_total', 20, 3)->unsigned()->comment('退款金额');
|
||||
$table->decimal('actual_total', 20, 3)->unsigned()->default(0.000)->comment('实退金额');
|
||||
$table->string('state', 16);
|
||||
$table->string('remark')->nullable();
|
||||
$table->dateTime('refunded_at')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('order_refunds');
|
||||
}
|
||||
|
||||
}
|
||||
43
vendor/rulong/order/database/migrations/2018_10_26_000000_create_orders_table.php
vendored
Normal file
43
vendor/rulong/order/database/migrations/2018_10_26_000000_create_orders_table.php
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateOrdersTable extends Migration
|
||||
{
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('orders', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('orderid', 32)->unique('orderid')->comment('订单编号');
|
||||
$table->integer('seller_id')->unsigned()->index();
|
||||
$table->integer('user_id')->unsigned()->index();
|
||||
$table->decimal('amount', 20, 3)->unsigned()->comment('商品金额');
|
||||
$table->decimal('freight', 10, 3)->unsigned()->nullable()->comment('运费');
|
||||
$table->string('status', 16)->default('0000')->comment('4码订单状态');
|
||||
$table->string('state', 16)->comment('状态');
|
||||
$table->string('remark')->nullable()->comment('订单备注');
|
||||
$table->dateTime('paid_at')->nullable()->comment('支付时间');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('orders');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user