OwnerFeeDetail.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. "counting_month", //结算月
  10. "worked_at", //作业时间
  11. "type", //类型
  12. "shop_id", //店铺ID
  13. "operation_bill", //发/收/退/提货单号
  14. "consignee_name", //收件人
  15. "consignee_phone", //收件人电话
  16. "commodity_amount", //商品数量
  17. "logistic_bill", //快递单号
  18. "volume", //体积
  19. "weight", //重量
  20. "logistic_id", //物流ID
  21. "process_method_id",//加工类型ID
  22. "work_fee", //作业费
  23. "logistic_fee", //物流费
  24. "created_at", //创建时间
  25. ];
  26. public $timestamps = false;
  27. public function owner()
  28. { //货主
  29. return $this->hasOne(Owner::class,"id","owner_id");
  30. }
  31. public function shop()
  32. { //店铺
  33. return $this->hasOne(Shop::class,"id","shop_id");
  34. }
  35. public function logistic()
  36. { //物流
  37. return $this->hasOne(Logistic::class,"id","logistic_id");
  38. }
  39. public function processMethod()
  40. { //作业类型
  41. return $this->hasOne(ProcessMethod::class,"id","process_method_id");
  42. }
  43. }