|
|
@@ -0,0 +1,47 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace App;
|
|
|
+
|
|
|
+use App\Services\ProcessMethodService;
|
|
|
+use Illuminate\Database\Eloquent\Model;
|
|
|
+
|
|
|
+class OwnerFeeDetail extends Model
|
|
|
+{
|
|
|
+ protected $fillable = [
|
|
|
+ "owner_id", //货主ID
|
|
|
+ "counting_month", //结算月
|
|
|
+ "worked_at", //作业时间
|
|
|
+ "type", //类型
|
|
|
+ "shop_id", //店铺ID
|
|
|
+ "operation_bill", //发/收/退/提货单号
|
|
|
+ "consignee_name", //收件人
|
|
|
+ "consignee_phone", //收件人电话
|
|
|
+ "commodity_amount", //商品数量
|
|
|
+ "logistic_bill", //快递单号
|
|
|
+ "volume", //体积
|
|
|
+ "weight", //重量
|
|
|
+ "logistic_id", //物流ID
|
|
|
+ "process_method_id",//加工类型ID
|
|
|
+ "work_fee", //作业费
|
|
|
+ "logistic_fee", //物流费
|
|
|
+ "created_at", //创建时间
|
|
|
+ ];
|
|
|
+ public $timestamps = false;
|
|
|
+
|
|
|
+ public function owner()
|
|
|
+ { //货主
|
|
|
+ return $this->hasOne(Owner::class,"id","owner_id");
|
|
|
+ }
|
|
|
+ public function shop()
|
|
|
+ { //店铺
|
|
|
+ return $this->hasOne(Shop::class,"id","shop_id");
|
|
|
+ }
|
|
|
+ public function logistic()
|
|
|
+ { //物流
|
|
|
+ return $this->hasOne(Logistic::class,"id","logistic_id");
|
|
|
+ }
|
|
|
+ public function processMethod()
|
|
|
+ { //作业类型
|
|
|
+ return $this->hasOne(ProcessMethod::class,"id","process_method_id");
|
|
|
+ }
|
|
|
+}
|