OwnerFeeDetail.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace App;
  3. use App\Services\ProcessMethodService;
  4. use Illuminate\Database\Eloquent\Model;
  5. class OwnerFeeDetail extends Model
  6. {
  7. protected $fillable = [
  8. "owner_id", //货主ID
  9. "worked_at", //作业时间
  10. "type", //类型
  11. "shop_id", //店铺ID
  12. "operation_bill", //发/收/退/提货单号
  13. "consignee_name", //收件人
  14. "consignee_phone", //收件人电话
  15. "commodity_amount", //商品数量
  16. "logistic_bill", //快递单号
  17. "volume", //体积
  18. "weight", //重量
  19. "logistic_id", //物流ID
  20. "process_method_id",//加工类型ID
  21. "work_fee", //作业费
  22. "logistic_fee", //物流费
  23. "created_at", //创建时间
  24. ];
  25. public $timestamps = false;
  26. public function owner()
  27. { //货主
  28. return $this->hasOne(Owner::class,"id","owner_id");
  29. }
  30. public function shop()
  31. { //店铺
  32. return $this->hasOne(Shop::class,"id","shop_id");
  33. }
  34. public function logistic()
  35. { //物流
  36. return $this->hasOne(Logistic::class,"id","logistic_id");
  37. }
  38. public function processMethod()
  39. { //作业类型
  40. return $this->hasOne(ProcessMethod::class,"id","process_method_id");
  41. }
  42. }