DgaSwitchModel.php 864 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * DgaSwitchModel.php UTF-8
  4. * 切量每日游戏渠道表
  5. *
  6. * @date : 2018/5/21 18:58
  7. *
  8. * @license 这不是一个自由软件,未经授权不许任何使用和传播。
  9. * @author : chenbingling <cbl@huosdk.com>
  10. * @version : HUOSDK 8.0
  11. */
  12. namespace huoAgentSwitch\model;
  13. use huo\model\common\CommonModel;
  14. use huo\model\game\GameModel;
  15. use huo\model\user\UserModel;
  16. class DgaSwitchModel extends CommonModel {
  17. protected $name = 'dga_switch';
  18. /**
  19. * @return \think\model\relation\BelongsTo
  20. */
  21. public function game() {
  22. return $this->belongsTo(GameModel::className(), 'app_id', 'id')->field('id,name');
  23. }
  24. /**
  25. * @return \think\model\relation\BelongsTo
  26. */
  27. public function agent() {
  28. return $this->belongsTo(UserModel::className(), 'agent_id', 'id')->field('id,user_login');
  29. }
  30. }