| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M241107142812AddTablePaymentTradeItem
- */
- class M241107142812AddTablePaymentTradeItem extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = <<<SQL
- CREATE TABLE `qimall_payment_trade_item` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `mall_id` int(10) unsigned NOT NULL COMMENT '商城ID',
- `trade_id` int(10) unsigned NOT NULL COMMENT '支付订单ID',
- `user_id` int(10) unsigned NOT NULL COMMENT '用户ID',
- `pay_type` tinyint(4) unsigned NOT NULL COMMENT '支付类型',
- `pay_fee` decimal(10,2) unsigned NOT NULL COMMENT '支付金额',
- `is_pay` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否支付',
- `pay_mode` tinyint(1) unsigned NOT NULL COMMENT '支付模式',
- `is_close` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否关闭订单退款',
- `is_refund` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否售后订单退款',
- `updated_at` int(10) DEFAULT NULL,
- `created_at` int(10) DEFAULT NULL,
- `trade_type` varchar(100) NOT NULL DEFAULT '' COMMENT '聚合支付具体的支付方式(如汇聚-微信,汇聚-支付宝)',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='支付流水子项';
- SQL;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- return false;
- }
- }
|