| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- namespace addons\ScoreBonus\console\migrations;
- use yii\db\Migration;
- /**
- * Class M240624091206CreateQimallAddonsScoreBonusRewardLog
- */
- class M240624091206CreateQimallAddonsScoreBonusRewardLog extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $this->execute("CREATE TABLE `qimall_addons_score_bonus_reward_log` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
- `mall_id` int(11) NOT NULL COMMENT '商城id',
- `user_id` int(11) DEFAULT NULL COMMENT '用户id',
- `bid` int(11) DEFAULT NULL COMMENT '结算周期id',
- `amounts` decimal(10,2) DEFAULT NULL COMMENT '结算总金额,单位:元',
- `total_score` decimal(19,2) DEFAULT NULL COMMENT '结算时平台总积分',
- `score` decimal(12,2) DEFAULT NULL COMMENT '结算时用户积分',
- `commission` decimal(10,2) DEFAULT NULL COMMENT '积分分红结算佣金',
- `status` tinyint(1) DEFAULT NULL COMMENT '状态(-1删除, 0禁用, 1启用)',
- `bonus_circle` tinyint(1) DEFAULT NULL COMMENT '结算周期(1:周,2:月, 3:日)',
- `date_time` int(11) DEFAULT NULL COMMENT '当期结算日期',
- `created_at` int(11) DEFAULT NULL COMMENT '创建时间',
- `updated_at` int(11) DEFAULT NULL COMMENT '修改时间',
- `change_type` varchar(50) DEFAULT NULL COMMENT '更改类型(add:增加,sub:扣减)',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='积分分红结算佣金用户记录表'");
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240624091206CreateQimallAddonsScoreBonusRewardLog cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M240624091206CreateQimallAddonsScoreBonusRewardLog cannot be reverted.\n";
- return false;
- }
- */
- }
|