LiveRoomGoods.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\model\activity\live;
  12. use crmeb\basic\BaseModel;
  13. use crmeb\traits\ModelTrait;
  14. /**
  15. * 直播间关联商品
  16. * Class LiveRoomGoods
  17. * @package app\model\activity\live
  18. */
  19. class LiveRoomGoods extends BaseModel
  20. {
  21. use ModelTrait;
  22. protected $name = 'live_room_goods';
  23. public function goods()
  24. {
  25. return $this->hasOne(LiveGoods::class, 'id', 'live_goods_id');
  26. }
  27. public function room()
  28. {
  29. return $this->hasOne(LiveRoom::class, 'id', 'live_room_id');
  30. }
  31. }