| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M250603015311CreateQimallUserTeamProfitStatistics
- */
- class M250603015311CreateQimallUserTeamProfitStatistics extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "CREATE TABLE `qimall_user_team_profit_statistics` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
- `mall_id` int(11) NOT NULL COMMENT '商城id',
- `user_id` int(11) NOT NULL COMMENT '用户id',
- `children_order_pay_profit` decimal(16,2) NOT NULL COMMENT '下级团队订单支付总利润(不包含自己)',
- `team_order_pay_profit` decimal(16,2) NOT NULL COMMENT '团队订单支付总利润(包含自己)',
- `children_order_finish_profit` decimal(16,2) NOT NULL COMMENT '下级团队订单完成总利润(不包含自己)',
- `team_order_finish_profit` decimal(16,2) NOT NULL COMMENT '团队订单完成总利润(包含自己)',
- `created_at` int(11) DEFAULT NULL COMMENT '添加时间',
- `updated_at` int(11) DEFAULT NULL COMMENT '修改时间',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户团队订单利润统计表';";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M250603015311CreateQimallUserTeamProfitStatistics cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M250603015311CreateQimallUserTeamProfitStatistics cannot be reverted.\n";
- return false;
- }
- */
- }
|