ranjith-dev #918
@@ -51,6 +51,11 @@ class Line extends Model
|
||||
return $this->hasMany(TestingPanelReading::class);
|
||||
}
|
||||
|
||||
public function beforeTestReadings()
|
||||
{
|
||||
return $this->hasMany(BeforeTestReading::class);
|
||||
}
|
||||
|
||||
public function workGroupMasters(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(WorkGroupMaster::class);
|
||||
|
||||
@@ -35,12 +35,12 @@ class Machine extends Model
|
||||
|
||||
public function productCharacteristicsMasters()
|
||||
{
|
||||
return $this->hasMany(ProductCharacteristicsMaster::class);
|
||||
return $this->hasMany(ProductCharacteristicsMaster::class, 'machine_id', 'id');
|
||||
}
|
||||
|
||||
public function characteristicValues()
|
||||
{
|
||||
return $this->hasMany(CharacteristicValue::class);
|
||||
return $this->hasMany(CharacteristicValue::class, 'machine_id', 'id');
|
||||
}
|
||||
|
||||
public function ClassCharacteristics()
|
||||
@@ -65,12 +65,17 @@ class Machine extends Model
|
||||
|
||||
public function testingPanelReadings()
|
||||
{
|
||||
return $this->hasMany(TestingPanelReading::class);
|
||||
return $this->hasMany(TestingPanelReading::class, 'machine_id', 'id');
|
||||
}
|
||||
|
||||
public function beforeTestReadings()
|
||||
{
|
||||
return $this->hasMany(BeforeTestReading::class, 'machine_id', 'id');
|
||||
}
|
||||
|
||||
public function tempClassCharacteristics()
|
||||
{
|
||||
return $this->hasMany(TempClassCharacteristic::class, 'plant_id', 'id');
|
||||
return $this->hasMany(TempClassCharacteristic::class, 'machine_id', 'id');
|
||||
}
|
||||
|
||||
public function equipmentMasters()
|
||||
|
||||
@@ -12,39 +12,39 @@ class MotorTestingMaster extends Model
|
||||
|
||||
protected $fillable = [
|
||||
'plant_id',
|
||||
'item_id',
|
||||
'item_id',
|
||||
'subassembly_code',
|
||||
'isi_model',
|
||||
'phase',
|
||||
'kw',
|
||||
'hp',
|
||||
'volt',
|
||||
'current',
|
||||
'rpm',
|
||||
'torque',
|
||||
'frequency',
|
||||
'connection',
|
||||
'ins_res_limit',
|
||||
'ins_res_type',
|
||||
'isi_model',
|
||||
'phase',
|
||||
'kw',
|
||||
'hp',
|
||||
'volt',
|
||||
'current',
|
||||
'rpm',
|
||||
'torque',
|
||||
'frequency',
|
||||
'connection',
|
||||
'ins_res_limit',
|
||||
'ins_res_type',
|
||||
'routine_test_time',
|
||||
'res_ry_ll',
|
||||
'res_ry_ul',
|
||||
'res_yb_ll',
|
||||
'res_yb_ul',
|
||||
'res_br_ll',
|
||||
'res_br_ul',
|
||||
'lock_volt_limit',
|
||||
'leak_cur_limit',
|
||||
'lock_cur_ll',
|
||||
'lock_cur_ul',
|
||||
'noload_cur_ll',
|
||||
'noload_cur_ul',
|
||||
'noload_pow_ll',
|
||||
'noload_pow_ul',
|
||||
'noload_spd_ll',
|
||||
'noload_spd_ul',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
'res_ry_ll',
|
||||
'res_ry_ul',
|
||||
'res_yb_ll',
|
||||
'res_yb_ul',
|
||||
'res_br_ll',
|
||||
'res_br_ul',
|
||||
'lock_volt_limit',
|
||||
'leak_cur_limit',
|
||||
'lock_cur_ll',
|
||||
'lock_cur_ul',
|
||||
'noload_cur_ll',
|
||||
'noload_cur_ul',
|
||||
'noload_pow_ll',
|
||||
'noload_pow_ul',
|
||||
'noload_spd_ll',
|
||||
'noload_spd_ul',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
];
|
||||
|
||||
public function plant(): BelongsTo
|
||||
@@ -52,14 +52,18 @@ class MotorTestingMaster extends Model
|
||||
return $this->belongsTo(Plant::class);
|
||||
}
|
||||
|
||||
public function item(): BelongsTo
|
||||
public function item(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Item::class, 'item_id', 'id');
|
||||
// return $this->belongsTo(Item::class);
|
||||
}
|
||||
|
||||
public function testingPanelReadings()
|
||||
{
|
||||
return $this->hasMany(TestingPanelReading::class, 'motor_testing_master_id');
|
||||
return $this->hasMany(TestingPanelReading::class, 'motor_testing_master_id', 'id');
|
||||
}
|
||||
|
||||
public function beforeTestReadings()
|
||||
{
|
||||
return $this->hasMany(BeforeTestReading::class, 'motor_testing_master_id', 'id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,9 +164,9 @@ class Plant extends Model
|
||||
// return $this->hasMany(ModelMaster::class, 'plant_id', 'id');
|
||||
// }
|
||||
|
||||
// public function rejectReasons()
|
||||
// public function windedSerialValidationErrors()
|
||||
// {
|
||||
// return $this->hasMany(RejectReason::class, 'plant_id', 'id');
|
||||
// return $this->hasMany(WindedSerialValidationError::class, 'plant_id', 'id');
|
||||
// }
|
||||
|
||||
public function requestCharacteristics()
|
||||
@@ -199,6 +199,11 @@ class Plant extends Model
|
||||
return $this->hasMany(LeakTestReading::class, 'plant_id', 'id');
|
||||
}
|
||||
|
||||
public function beforeTestReadings()
|
||||
{
|
||||
return $this->hasMany(BeforeTestReading::class, 'plant_id', 'id');
|
||||
}
|
||||
|
||||
public function asrsItemValidations()
|
||||
{
|
||||
return $this->hasMany(AsrsItemValidation::class, 'plant_id', 'id');
|
||||
@@ -218,6 +223,4 @@ class Plant extends Model
|
||||
{
|
||||
return $this->hasMany(PanelBoxValidation::class, 'plant_id', 'id');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user