|
|
@@ -4,11 +4,11 @@ namespace App;
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
-use App\Traits\LogModelChanging;
|
|
|
+use App\Traits\ModelLogChanging;
|
|
|
|
|
|
class Batch extends Model
|
|
|
{
|
|
|
- use LogModelChanging;
|
|
|
+ use ModelLogChanging;
|
|
|
|
|
|
protected $fillable = [
|
|
|
'id','code','type', 'wms_type', 'status', 'wms_status', 'wms_created_at',"remark","owner_id",
|
|
|
@@ -41,5 +41,17 @@ class Batch extends Model
|
|
|
{
|
|
|
return $this->hasOne(Owner::class,"id","owner_id");
|
|
|
}
|
|
|
+ public function stationBatchTask()
|
|
|
+ {
|
|
|
+ return $this->hasOne(StationTaskBatch::class);
|
|
|
+ }
|
|
|
+ public function stationTask()
|
|
|
+ {
|
|
|
+
|
|
|
+ return $this->stationBatchTask?
|
|
|
+ $this->stationBatchTask->belongsTo(StationTask::class):
|
|
|
+ null;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|