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