2022-07-09 03:09:04 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
class plan extends Model
|
|
|
|
{
|
|
|
|
use HasFactory;
|
2022-08-02 04:44:21 +00:00
|
|
|
public $timestamps = true;
|
2022-07-09 03:09:04 +00:00
|
|
|
|
|
|
|
protected $table ='plans';
|
|
|
|
protected $fillable = [
|
|
|
|
'codigo',
|
2022-07-27 05:42:33 +00:00
|
|
|
'nombre',
|
|
|
|
'oportunidad_plan',
|
|
|
|
'semestre_ejecucion',
|
2022-07-09 03:09:04 +00:00
|
|
|
'duracion',
|
|
|
|
'estado',
|
|
|
|
'avance',
|
2022-07-27 05:42:33 +00:00
|
|
|
'evaluacion_eficacia',
|
2022-07-09 03:09:04 +00:00
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
public function users(){
|
|
|
|
return $this->belongsTo(User::class,'id_user');
|
|
|
|
}
|
|
|
|
public function estandars(){
|
|
|
|
return $this->belongsTo(Estandar::class,'id_estandar');
|
|
|
|
}
|
2022-07-27 05:42:33 +00:00
|
|
|
public function fuentes(){
|
2022-08-22 20:50:45 +00:00
|
|
|
return $this->hasMany(Fuentes::class,'id_plan');
|
2022-07-27 05:42:33 +00:00
|
|
|
}
|
|
|
|
public function metas(){
|
2022-08-22 20:50:45 +00:00
|
|
|
return $this->hasMany(Metas::class,'id_plan');
|
2022-07-27 05:42:33 +00:00
|
|
|
}
|
|
|
|
public function recursos(){
|
2022-08-22 20:50:45 +00:00
|
|
|
return $this->hasMany(Recursos::class,'id_plan');
|
2022-07-27 05:42:33 +00:00
|
|
|
}
|
|
|
|
public function observaciones(){
|
2022-08-22 20:50:45 +00:00
|
|
|
return $this->hasMany(Observaciones::class,'id_plan');
|
2022-07-27 05:42:33 +00:00
|
|
|
}
|
|
|
|
public function problemasOportunidade(){
|
2022-08-22 20:50:45 +00:00
|
|
|
return $this->hasMany(ProblemasOportunidades::class,'id_plan');
|
2022-07-27 05:42:33 +00:00
|
|
|
}
|
|
|
|
public function accionesMejoras(){
|
2022-08-22 20:50:45 +00:00
|
|
|
return $this->hasMany(AccionesMejoras::class,'id_plan');
|
2022-07-27 05:42:33 +00:00
|
|
|
}
|
|
|
|
public function causasRaices(){
|
2022-08-25 23:21:04 +00:00
|
|
|
return $this->hasMany(CausasRaices::class,'id_plan');
|
2022-08-22 20:50:45 +00:00
|
|
|
}
|
|
|
|
public function responsables(){
|
|
|
|
return $this->hasMany(Responsables::class,'id_plan');
|
2022-07-27 05:42:33 +00:00
|
|
|
}
|
|
|
|
//
|
2022-08-22 20:50:45 +00:00
|
|
|
|
2022-07-09 03:09:04 +00:00
|
|
|
|
|
|
|
}
|