unsa-pis-be/app/Models/Estandar.php

31 lines
598 B
PHP
Raw Normal View History

2022-06-14 01:21:39 +00:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Estandar extends Model
{
2022-06-14 01:21:39 +00:00
use HasFactory;
2022-08-02 04:44:21 +00:00
public $timestamps = true;
protected $table ='estandars';
protected $fillable = [
'name',
2022-10-11 05:28:42 +00:00
'cabecera'
];
public function users(){
return $this->belongsTo(User::class,'id_user');
}
public function plans(){
2022-08-22 20:50:45 +00:00
return $this->hasMany(plan::class,'id_estandar');
}
2022-10-08 00:36:40 +00:00
public function narrativas(){
return $this->hasMany(narrativa::class,'id_narrativa');
}
2022-07-27 05:42:33 +00:00
2022-06-14 01:21:39 +00:00
}