1
0

20220626093736_create_data_to_medal.php 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. use think\migration\Migrator;
  3. use think\migration\db\Column;
  4. use app\model\Medal;
  5. class CreateDataToMedal extends Migrator
  6. {
  7. /**
  8. * Change Method.
  9. *
  10. * Write your reversible migrations using this method.
  11. *
  12. * More information on writing migrations is available here:
  13. * http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
  14. *
  15. * The following commands can be used in this method and Phinx will
  16. * automatically reverse them when rolling back:
  17. *
  18. * createTable
  19. * renameTable
  20. * addColumn
  21. * renameColumn
  22. * addIndex
  23. * addForeignKey
  24. *
  25. * Remember to call "create()" or "update()" and NOT "save()" when working
  26. * with the Table class.
  27. */
  28. public function change()
  29. {
  30. $data = [
  31. ['title'=>10 ,'content'=>'累计学完10门课程','type'=>'class','condition'=>10 ,'remark'=>'学完课程' ,'path'=>'Train/62b9053da6ca5.png'],
  32. ['title'=>20 ,'content'=>'累计学完20门课程','type'=>'class','condition'=>20 ,'remark'=>'学完课程' ,'path'=>'Train/62b9053da6ca5.png'],
  33. ['title'=>30 ,'content'=>'累计学完30门课程','type'=>'class','condition'=>30,'remark'=>'学完课程' ,'path'=>'Train/62b9053da6ca5.png'],
  34. ['title'=>'达人','content'=>'累计学完50门课程','type'=>'class','condition'=>50 ,'remark'=>'能力提升' ,'path'=>'Train/62b905544ba6a.png'],
  35. ['title'=> 10,'content'=>'累计获客10人','type'=>'clue','condition'=>10 ,'remark'=>'客户浏览' ,'path'=>'Train/62b9056f0eb5c.png'],
  36. ['title'=> 30,'content'=>'累计获客30人','type'=>'clue','condition'=>30 ,'remark'=>'客户浏览' ,'path'=>'Train/62b9056f0eb5c.png'],
  37. ['title'=> 60,'content'=>'累计获客60人','type'=>'clue','condition'=> 60,'remark'=>'客户浏览' ,'path'=>'Train/62b9056f0eb5c.png'],
  38. ['title'=> '达人','content'=>'累计获客90人','type'=>'clue','condition'=> 90,'remark'=>'品牌触达' ,'path'=>'Train/62b905841809b.png'],
  39. ['title'=> 10,'content'=>'累计回答10条','type'=>'comment','condition'=> 10,'remark'=>'话术回答' ,'path'=>'Train/62b90613e0e88.png'],
  40. ['title'=> 30,'content'=>'累计回答30条','type'=>'comment','condition'=> 30,'remark'=>'话术回答' ,'path'=>'Train/62b90613e0e88.png'],
  41. ['title'=> 60,'content'=>'累计回答60条','type'=>'comment','condition'=> 60,'remark'=>'话术回答' ,'path'=>'Train/62b90613e0e88.png'],
  42. ['title'=> '达人','content'=>'累计回答90条','type'=>'comment','condition'=> 90,'remark'=>'答疑解惑' ,'path'=>'Train/62b905fadec87.png'],
  43. ['title'=> 7,'content'=>'累计签到7天','type'=>'sign','condition'=> 7,'remark'=>'登录天数' ,'path'=>'Train/62b9059bdcba8.png'],
  44. ['title'=> 30,'content'=>'累计签到30天','type'=>'sign','condition'=> 30,'remark'=>'登录天数' ,'path'=>'Train/62b9059bdcba8.png'],
  45. ['title'=> 60,'content'=>'累计签到60天','type'=>'sign','condition'=> 60,'remark'=>'登录天数' ,'path'=>'Train/62b9059bdcba8.png'],
  46. ['title'=> '达人','content'=>'累计签到365天','type'=>'sign','condition'=> 365,'remark'=>'系统使用' ,'path'=>'Train/62b905b0de036.png'],
  47. ['title'=> 100,'content'=>'累计跟进100次','type'=>'visit_log','condition'=>100 ,'remark'=>'跟进次数' ,'path'=>'Train/62b906300196c.png'],
  48. ['title'=> 300,'content'=>'累计跟进300次','type'=>'visit_log','condition'=> 300,'remark'=>'跟进次数' ,'path'=>'Train/62b906300196c.png'],
  49. ['title'=> 500,'content'=>'累计跟进500次','type'=>'visit_log','condition'=>500 ,'remark'=>'跟进次数' ,'path'=>'Train/62b906300196c.png'],
  50. ['title'=> '达人','content'=>'累计跟进1000次','type'=>'visit_log','condition'=>1000 ,'remark'=>'客户维护' ,'path'=>'Train/62b9064270f1d.png'],
  51. ];
  52. (new Medal())->saveAll($data);
  53. }
  54. }