M241108110255CreatePaymentTypeRefundStatisticsTable.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace app\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Handles the creation of table `{{%payment_type_refund_statistics}}`.
  6. */
  7. class M241108110255CreatePaymentTypeRefundStatisticsTable extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $sql = <<<SQL
  15. CREATE TABLE `qimall_payment_type_refund_statistics` (
  16. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  17. `mall_id` int(10) unsigned NOT NULL DEFAULT '0',
  18. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]',
  19. `payment_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '支付方式',
  20. `payment_identifier` varchar(255) NOT NULL DEFAULT '' COMMENT '数据唯一性标识符(支付方式加具体的支付方法拼接而成,如果是组合支付则用 , 分割,例如:7|WEIXIN_XCX,16|W06-CASHIER)',
  21. `trade_type` varchar(100) NOT NULL DEFAULT '' COMMENT '聚合支付具体的支付方式',
  22. `is_pay_group` tinyint(3) unsigned NOT NULL DEFAULT '0',
  23. `created_at` int(10) unsigned NOT NULL DEFAULT '0',
  24. `updated_at` int(10) unsigned NOT NULL DEFAULT '0',
  25. PRIMARY KEY (`id`)
  26. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='统计每种支付方式的退款数据';
  27. SQL;
  28. $this->execute($sql);
  29. }
  30. /**
  31. * {@inheritdoc}
  32. */
  33. public function safeDown()
  34. {
  35. return false;
  36. }
  37. }