Cotizaciones/app/Models/Institucione.php
2026-04-24 11:19:03 -07:00

63 lines
1.3 KiB
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class Institucione
*
* @property $id
* @property $nombre
* @property $cve_institucion
* @property $usuario_sep
* @property $password_sep
* @property $activo
* @property $created_at
* @property $updated_at
*
* @property Firmante[] $firmantes
* @property Titulo[] $titulos
* @property User[] $users
* @package App
* @mixin \Illuminate\Database\Eloquent\Builder
*/
class Institucione extends Model
{
protected $perPage = 20;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = ['nombre', 'cve_institucion', 'usuario_sep', 'password_sep', 'activo'];
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function firmantes()
{
return $this->hasMany(\App\Models\Firmante::class, 'id', 'institucion_id');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function titulos()
{
return $this->hasMany(\App\Models\Titulo::class, 'id', 'institucion_id');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function users()
{
return $this->hasMany(\App\Models\User::class, 'id', 'institucion_id');
}
}