AddInitChannelSaleStatisticsSeeder.php 565 B

123456789101112131415161718192021222324
  1. <?php
  2. use app\api\model\ChannelSaleStatistics;
  3. use think\migration\Seeder;
  4. class AddInitChannelSaleStatisticsSeeder extends Seeder
  5. {
  6. /**
  7. * 活动效果统计初始数据填充
  8. *
  9. * More information on writing seeders is available here:
  10. * http://docs.phinx.org/en/latest/seeding.html
  11. */
  12. public function run()
  13. {
  14. echo "开始创建数据 \n";
  15. $ret = ChannelSaleStatistics::addInitData();
  16. if (!$ret) {
  17. echo "执行失败!\n";
  18. } else {
  19. echo "执行成功\n";
  20. }
  21. }
  22. }