belongsTo(OwnerFeeDetail::class); } public function commodity(): BelongsTo { return $this->belongsTo(Commodity::class); } public function owner(): BelongsTo { return $this->belongsTo(Owner::class); } public function unit(): BelongsTo { return $this->belongsTo(Unit::class); } /** * 根据参数条件删除 * @param $data */ public static function uDelete($data) { self::query() ->where('owner_fee_detail_id',$data['owner_fee_detail_id']) ->where('commodity_id',$data['commodity_id']) ->where('owner_id',$data['owner_id']) ->where('source_bill',$data['source_bill']) ->where('unit_id',$data['unit_id']) ->where('sku',$data['sku']) ->where('barcode',$data['barcode']) ->where('work_name',$data['work_name']) ->delete(); } }