Added hasMany relation on model files and Updated report filter functionality on resource file
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s

This commit is contained in:
dhanabalan
2026-02-26 21:54:34 +05:30
parent fe54de7ac8
commit bba8649da7
4 changed files with 98 additions and 37 deletions

View File

@@ -56,6 +56,11 @@ class Line extends Model
return $this->hasMany(ProcessOrder::class);
}
public function productCharacteristicsMasters()
{
return $this->hasMany(ProductCharacteristicsMaster::class);
}
public function workGroup1()
{
return $this->belongsTo(WorkGroupMaster::class, 'work_group1_id', 'id');

View File

@@ -12,9 +12,9 @@ class Machine extends Model
protected $fillable = [
'plant_id',
'line_id',
'line_id',
'work_group_master_id',
'name',
'name',
'work_center',
];
@@ -23,7 +23,7 @@ class Machine extends Model
return $this->belongsTo(Plant::class);
}
public function line(): BelongsTo
public function line(): BelongsTo
{
return $this->belongsTo(Line::class);
}
@@ -33,6 +33,11 @@ class Machine extends Model
return $this->belongsTo(WorkGroupMaster::class);
}
public function productCharacteristicsMasters()
{
return $this->hasMany(ProductCharacteristicsMaster::class);
}
public function testingPanelReadings()
{
return $this->hasMany(TestingPanelReading::class);
@@ -42,5 +47,4 @@ class Machine extends Model
{
return $this->hasMany(EquipmentMaster::class, 'machine_id', 'id');
}
}

View File

@@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
class WorkGroupMaster extends Model
{
use SoftDeletes;
use SoftDeletes;
protected $fillable = [
'plant_id',
@@ -25,6 +25,11 @@ class WorkGroupMaster extends Model
return $this->belongsTo(Plant::class);
}
public function productCharacteristicsMasters()
{
return $this->hasMany(ProductCharacteristicsMaster::class);
}
// public function rejectReasons()
// {
// return $this->hasMany(RejectReason::class, 'work_group_master_id', 'id');