DayGameModel.php 714 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * DayPayModel.php UTF-8
  4. *
  5. *
  6. * @date : 2017/12/18 11:41
  7. *
  8. * @license 这不是一个自由软件,未经授权不许任何使用和传播。
  9. * @author : liguanglong <lgl@huosdk.com>
  10. * @version : HUOSDK 8.0
  11. */
  12. namespace huo\model\data;
  13. class DayGameModel extends DayBaseModel {
  14. #protected $name = 'day_game';
  15. protected $table = 'dw_day_game';
  16. // public function game() {
  17. // return $this->hasOne('huo\model\game\GameModel', 'id', 'app_id')->setEagerlyType(0);
  18. // }
  19. /**
  20. * 关联game游戏表
  21. */
  22. public function game() {
  23. return $this->belongsTo('huo\model\game\GameModel', 'app_id')
  24. ->field('id,name,classify,icon');
  25. }
  26. }