42 lines
977 B
PHP
Executable File
42 lines
977 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ControlEquipmentWorkstation extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
public $timestamps = false;
|
|
|
|
protected $table = 'control_equipment_workstation';
|
|
|
|
protected $primaryKey = 'control_equipment_workstation_id';
|
|
|
|
// protected $primaryKey = 'id';
|
|
|
|
public function equipment()
|
|
{
|
|
return $this->belongsTo(Equipment::class, 'equipment_id', 'equipment_id');
|
|
}
|
|
|
|
public function equipmentWorkHistory(){
|
|
return $this->belongsTo(EquipmentWorkHistory::class,'equipmentWorkHistorys_id','equipmentWorkHistorys_id');
|
|
}
|
|
|
|
public function elementalTask()
|
|
{
|
|
return $this->belongsTo(ElementalTasks::class,'elemental_tasks_id','elemental_tasks_id');
|
|
}
|
|
|
|
public function furtherTasks()
|
|
{
|
|
return $this->belongsTo(FurtherTasks::class,'further_tasks_id','further_tasks_id');
|
|
}
|
|
|
|
|
|
|
|
}
|