| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?php
- namespace addons\Agent\console\migrations;
- use yii\db\Migration;
- /**
- * Class M240621035039CreateAddonsAgentDelayLog
- */
- class M240621035039CreateAddonsAgentDelayLog extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = <<<SQL
- CREATE TABLE `qimall_addons_agent_delay_log` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `mall_id` int(11) NOT NULL COMMENT '商城ID',
- `user_id` int(11) NOT NULL DEFAULT 0 COMMENT '用户ID',
- `compute_type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '结算方式, 0订单完成后,1订单支付后',
- `wallet_type` varchar(64) NOT NULL COMMENT '资产类型',
- `wallet_num` decimal(12,2) NOT NULL DEFAULT 0 COMMENT '结算资产数量',
- `day_num` int(11) NOT NULL DEFAULT 0 COMMENT '延时天数',
- `wallet_desc` varchar(255) COMMENT '资产变动说明',
- `order_no` varchar(100) COMMENT '订单编号',
- `capital_type` varchar(64) NOT NULL COMMENT '资金奖励类型',
- `contributor_name` varchar(255) COMMENT '资产类型',
- `contributor_money` decimal(12,2) COMMENT '分佣金额/手续费',
- `contributor_id` int(11) NOT NULL COMMENT '贡献者id',
- `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态,0未结算,1已结算',
- `agented_at` int(11) NOT NULL DEFAULT 0 COMMENT '结算时间',
- `created_at` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间',
- `updated_at` int(11) NOT NULL DEFAULT 0 COMMENT '更新时间',
- PRIMARY KEY (`id`) USING BTREE,
- KEY `idx_mall_user` (`mall_id`,`user_id`) USING BTREE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='渠道分红延时结算日志';
- SQL;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240621035039CreateAddonsAgentDelayLog cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M240621035039CreateAddonsAgentDelayLog cannot be reverted.\n";
- return false;
- }
- */
- }
|