Goods.php 994 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace app\agent\model\order;
  3. use app\common\model\BaseModel;
  4. class Goods extends BaseModel
  5. {
  6. protected $name = 'goods_order';
  7. /**
  8. *
  9. * @author 许祖兴 < zuxing.xu@lettered.cn>
  10. * @date 2020/7/3 9:14
  11. *
  12. * @return \think\model\relation\BelongsTo
  13. */
  14. public function user()
  15. {
  16. return $this->belongsTo('\app\common\model\Users','user_id');
  17. }
  18. /**
  19. *
  20. * @author 许祖兴 < zuxing.xu@lettered.cn>
  21. * @date 2020/7/3 9:14
  22. *
  23. * @return \think\model\relation\BelongsTo
  24. */
  25. public function seller()
  26. {
  27. return $this->belongsTo('\app\common\model\Seller','seller_id');
  28. }
  29. /**
  30. *
  31. * @author 许祖兴 < zuxing.xu@lettered.cn>
  32. * @date 2020/7/3 9:14
  33. *
  34. * @return \think\model\relation\BelongsTo
  35. */
  36. public function addr()
  37. {
  38. return $this->belongsTo('\app\common\model\UsersAddr','addr_id');
  39. }
  40. }