HourGameAgentModel.php 935 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * HourGameAgentModel.php UTF-8
  4. * 每日游戏渠道时表
  5. *
  6. * @date : 2019/12/11 11:06
  7. *
  8. * @license 这不是一个自由软件,未经授权不许任何使用和传播。
  9. * @author : dengcongshuai <dcs@huosdk.com>
  10. * @version : HUOSDK 8.0
  11. */
  12. namespace huomp\model\hour;
  13. use huo\model\data\DayBaseModel;
  14. use huo\model\game\GameModel;
  15. use huo\model\user\UserModel;
  16. class HourGameAgentModel extends DayBaseModel {
  17. protected $name = 'hour_game_agent';
  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(
  29. 'id,user_login,user_nicename,role_id,parent_id,ext_info'
  30. );
  31. }
  32. }