DayGameAgentModel.php 937 B

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