| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- namespace addons\ScoreBonus\console\migrations;
- use yii\db\Migration;
- /**
- * Class M240624091136CreateQimallAddonsScoreBonus
- */
- class M240624091136CreateQimallAddonsScoreBonus extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $this->execute("CREATE TABLE `qimall_addons_score_bonus` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
- `mall_id` int(11) DEFAULT NULL COMMENT '商城id',
- `bonus_circle` tinyint(1) DEFAULT NULL COMMENT '结算周期(1:周,2:月, 3:日)',
- `status` tinyint(1) DEFAULT NULL COMMENT '状态(-1:删除,0禁用,1启用)',
- `num` int(11) DEFAULT NULL COMMENT '结算期数',
- `bonus_price` decimal(19,2) DEFAULT NULL COMMENT '当期分红池金额',
- `bonus_num` int(11) DEFAULT NULL COMMENT '当期参与分红人数',
- `created_at` int(11) DEFAULT NULL COMMENT '创建时间',
- `updated_at` int(11) DEFAULT NULL COMMENT '修改时间',
- `date_time` int(11) DEFAULT NULL COMMENT '结算所属日期',
- `settle_price` decimal(19,2) DEFAULT NULL COMMENT '当期结算总金额',
- `total_score` decimal(19,2) DEFAULT NULL COMMENT '周期总积分',
- `num_text` varchar(255) DEFAULT NULL COMMENT '结算期数文本',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='积分分红结算记录表'");
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240624091136CreateQimallAddonsScoreBonus cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M240624091136CreateQimallAddonsScoreBonus cannot be reverted.\n";
- return false;
- }
- */
- }
|