This commit is contained in:
34
api/app/Models/Administracao/Notificacao.php
Normal file
34
api/app/Models/Administracao/Notificacao.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Administracao;
|
||||
|
||||
use App\Models\Cadastro\SujeitoAtencao\Lotacao;
|
||||
use App\Models\Model;
|
||||
|
||||
class Notificacao extends Model
|
||||
{
|
||||
protected $table = 'administracao_notificacao';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'tipo_id',
|
||||
'titulo',
|
||||
'mensagem',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function lotacoes()
|
||||
{
|
||||
return $this->belongsToMany(Lotacao::class, 'administracao_notificacao_lotacao', 'notificacao_id', 'lotacao_id')
|
||||
->withPivot('visualizado')
|
||||
->withTimestamps();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user