| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace addons\CloudStock\console\migrations;
- use yii\db\Migration;
- /**
- * Handles the creation of table `{{%cloud_stock_agent_order_refund}}`.
- */
- class M250212063533CreateCloudStockAgentOrderRefundTable extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = <<<SQL
- CREATE TABLE `qimall_addons_cloud_stock_agent_order_refund` (
- `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
- `mall_id` int UNSIGNED NOT NULL DEFAULT 0,
- `order_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '自提订单id',
- `order_type` tinyint(3) unsigned DEFAULT '0' COMMENT '退款订单类型',
- `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
- `order_no` varchar(255) NOT NULL DEFAULT '' COMMENT '退款编号',
- `status` tinyint NOT NULL DEFAULT 1 COMMENT '状态[-1:删除;0:禁用;1启用]',
- `is_refund` tinyint NOT NULL DEFAULT 0 COMMENT '是否已打款',
- `refund_at` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '打款时间',
- `refund_price` decimal(12, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '退款金额',
- `reality_refund_price` decimal(12, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '实际退款金额',
- `created_at` int UNSIGNED NOT NULL DEFAULT 0,
- `updated_at` int UNSIGNED NOT NULL DEFAULT 0,
- PRIMARY KEY (`id`)
- );
- SQL;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- return false;
- }
- }
|