|
@@ -1,7 +1,7 @@
|
|
|
<?php
|
|
<?php
|
|
|
|
|
+declare(strict_types=1);
|
|
|
|
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
-use think\migration\db\Column;
|
|
|
|
|
|
|
|
|
|
class ExtensionPayment extends AbstractMigration
|
|
class ExtensionPayment extends AbstractMigration
|
|
|
{
|
|
{
|
|
@@ -30,20 +30,20 @@ class ExtensionPayment extends AbstractMigration
|
|
|
{
|
|
{
|
|
|
$this->table('extension_payment')
|
|
$this->table('extension_payment')
|
|
|
->setComment('订单支付记录表')
|
|
->setComment('订单支付记录表')
|
|
|
- ->addColumn(Column::integer('order_id')->setComment('关联订单ID'))
|
|
|
|
|
- ->addColumn(Column::char('order_sn', 20)->setComment('订单编号'))
|
|
|
|
|
- ->addColumn(Column::char('out_trade_no', 20)->setComment('商户支付订单号'))
|
|
|
|
|
- ->addColumn(Column::tinyInteger('biz_type')->setComment('业务类型:1-商品订单支付'))
|
|
|
|
|
- ->addColumn(Column::string('pay_type', 20)->setComment('支付方式:wechatpay-微信 xlpayment-信联支付'))
|
|
|
|
|
- ->addColumn(Column::json('payment_param')->setComment('支付参数'))
|
|
|
|
|
- ->addColumn(Column::decimal('amount', 10, 2)->setComment('支付金额(元)'))
|
|
|
|
|
- ->addColumn(Column::tinyInteger('status')->setComment('支付状态:0-待支付/1-支付中/2-成功/3-失败/4-已关闭/5-退款中'))
|
|
|
|
|
- ->addColumn(Column::char('transaction_id', 32)->setComment('三方支付订单号'))
|
|
|
|
|
- ->addColumn(Column::integer('payment_time')->setComment('支付成功时间'))
|
|
|
|
|
- ->addColumn(Column::integer('expire_time')->setComment('订单失效时间'))
|
|
|
|
|
- ->addColumn(Column::json('payment_result')->setComment('查询支付结果信息'))
|
|
|
|
|
- ->addColumn(Column::string('status_desc', 255)->setComment('支付状态说明'))
|
|
|
|
|
- ->addTimestamps()
|
|
|
|
|
|
|
+ ->addColumn('order_id', 'integer', ['comment' => '关联订单ID'])
|
|
|
|
|
+ ->addColumn('order_sn', 'char', ['limit' => 20, 'comment' => '订单编号'])
|
|
|
|
|
+ ->addColumn('out_trade_no', 'char', ['limit' => 20, 'comment' => '商户支付订单号'])
|
|
|
|
|
+ ->addColumn('biz_type', 'tinyinteger', ['comment' => '业务类型:1-商品订单支付'])
|
|
|
|
|
+ ->addColumn('pay_type', 'string', ['limit' => 20, 'comment' => '支付方式:wechatpay-微信 xlpayment-信联支付'])
|
|
|
|
|
+ ->addColumn('payment_param', 'json', ['comment' => '支付参数'])
|
|
|
|
|
+ ->addColumn('amount', 'decimal', ['precision' => 10, 'scale' => 2, 'comment' => '支付金额(元)'])
|
|
|
|
|
+ ->addColumn('status', 'tinyinteger', ['comment' => '支付状态:0-待支付/1-支付中/2-成功/3-失败/4-已关闭/5-退款中'])
|
|
|
|
|
+ ->addColumn('transaction_id', 'char', ['limit' => 32, 'comment' => '三方支付订单号'])
|
|
|
|
|
+ ->addColumn('payment_time', 'integer', ['comment' => '支付成功时间'])
|
|
|
|
|
+ ->addColumn('expire_time', 'integer', ['comment' => '订单失效时间'])
|
|
|
|
|
+ ->addColumn('payment_result', 'json', ['comment' => '查询支付结果信息'])
|
|
|
|
|
+ ->addColumn('status_desc', 'string', ['limit' => 255, 'comment' => '支付状态说明'])
|
|
|
|
|
+ ->addTimestamps('create_time', 'update_time')
|
|
|
->addIndex(['order_id', 'biz_type'])
|
|
->addIndex(['order_id', 'biz_type'])
|
|
|
->addIndex(['transaction_id'])
|
|
->addIndex(['transaction_id'])
|
|
|
->addIndex(['out_trade_no'], ['unique' => true])
|
|
->addIndex(['out_trade_no'], ['unique' => true])
|