UserRiceDeliveryExpress.php 689 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace app\common\model\card;
  3. use app\common\model\BaseModel;
  4. /**
  5. * 米卡配送物流模型
  6. * @package app\common\model
  7. */
  8. class UserRiceDeliveryExpress extends BaseModel
  9. {
  10. protected $name = 'user_rice_delivery_express';
  11. protected $append = [];
  12. /**
  13. * 一对一关联配送记录表
  14. */
  15. public function userRiceDelivery()
  16. {
  17. return $this->belongsTo('UserRiceDelivery', 'user_rice_delivery_id','id');
  18. }
  19. /**
  20. * 获取记录
  21. * @param int $id
  22. * @param array $with
  23. * @return static
  24. */
  25. public static function detail(int $id, array $with = [])
  26. {
  27. return static::get($id, $with);
  28. }
  29. }