Added workGroupMaster foreignKey and belongsTo relationship to Machine model
This commit is contained in:
@@ -13,6 +13,7 @@ class Machine extends Model
|
|||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'plant_id',
|
'plant_id',
|
||||||
'line_id',
|
'line_id',
|
||||||
|
'work_group_master_id',
|
||||||
'name',
|
'name',
|
||||||
'work_center',
|
'work_center',
|
||||||
];
|
];
|
||||||
@@ -27,6 +28,11 @@ class Machine extends Model
|
|||||||
return $this->belongsTo(Line::class);
|
return $this->belongsTo(Line::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function workGroupMaster(): BelongsTo
|
||||||
|
{
|
||||||
|
return $this->belongsTo(WorkGroupMaster::class);
|
||||||
|
}
|
||||||
|
|
||||||
public function testingPanelReadings()
|
public function testingPanelReadings()
|
||||||
{
|
{
|
||||||
return $this->hasMany(TestingPanelReading::class);
|
return $this->hasMany(TestingPanelReading::class);
|
||||||
|
|||||||
Reference in New Issue
Block a user