_create_order_tk(); } /** * 创建数据对象 * @class OrderTk * @table order_tk * @return void */ private function _create_order_tk() { // 创建数据表对象 $table = $this->table('order_tk', [ 'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '', ]); // 创建或更新数据表 PhinxExtend::upgrade($table, [ ['mid', 'integer', ['default' => NULL, 'null' => false, 'comment' => '商户id']], ['order_id', 'string', ['limit' => 800, 'default' => NULL, 'null' => true, 'comment' => '本站订单id']], ['merchant_order_id', 'string', ['limit' => 1000, 'default' => NULL, 'null' => true, 'comment' => '商户订单id']], ['status', 'tinyinteger', ['limit' => 1, 'default' => 1, 'null' => false, 'comment' => '1待处理2退款成功3退款失败']], ['create_at', 'timestamp', ['default' => 'CURRENT_TIMESTAMP', 'null' => false, 'comment' => '']], ], [ 'status', 'order_id', 'merchant_order_id', ], false); } }