Skip to content

Commit ded43a1

Browse files
committed
增加支付订管理迁移文件
1 parent d700e32 commit ded43a1

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Schema;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Database\Migrations\Migration;
6+
7+
class OmnipayOrdersTable extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('omnipay_orders', function (Blueprint $table) {
17+
$table->string('id') ->comment('订单编号')->unique();
18+
$table->bigInteger('uid') ->comment('用户ID')->default(0)->unsigned();
19+
$table->decimal('fee',11, 2) ->comment('订单金额')->unsigned()->default(0);
20+
$table->string('gateway',30) ->comment('支付网关');
21+
$table->string('query_id') ->comment('网关订单编号')->nullable();
22+
$table->string('status',10) ->comment('订单状态')->default('unpaid');
23+
$table->timestamps();
24+
});
25+
}
26+
27+
/**
28+
* Reverse the migrations.
29+
*
30+
* @return void
31+
*/
32+
public function down()
33+
{
34+
Schema::dropIfExists('omnipay_orders');
35+
}
36+
}

0 commit comments

Comments
 (0)