| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace App;
- use App\Services\ProcessMethodService;
- use Illuminate\Database\Eloquent\Model;
- class OwnerFeeDetail extends Model
- {
- protected $fillable = [
- "owner_id", //货主ID
- "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", //创建时间
- "outer_id", //关联表ID
- "outer_table_name", //关联表名
- ];
- 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");
- }
- }
|