|
|
@@ -7,7 +7,7 @@ use Illuminate\Database\Eloquent\Model;
|
|
|
class Batch extends Model
|
|
|
{
|
|
|
protected $fillable = [
|
|
|
- 'id','code','type', 'wms_type', 'status', 'wms_status', 'wms_created_at',"remark",
|
|
|
+ 'id','code','type', 'wms_type', 'status', 'wms_status', 'wms_created_at',"remark","owner_id",
|
|
|
];
|
|
|
public function orders(){
|
|
|
return $this->hasMany('App\Order','batch_id','id');
|
|
|
@@ -33,5 +33,9 @@ class Batch extends Model
|
|
|
});
|
|
|
return parent::delete(); // TODO: Change the autogenerated stub
|
|
|
}
|
|
|
+ public function owner()
|
|
|
+ {
|
|
|
+ return $this->hasOne(Owner::class,"id","owner_id");
|
|
|
+ }
|
|
|
|
|
|
}
|