This commit is contained in:
41
api/app/Models/Farmacia/LivroPagina.php
Normal file
41
api/app/Models/Farmacia/LivroPagina.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Farmacia;
|
||||
|
||||
use App\Models\Cadastro\Material\Material;
|
||||
use App\Models\Model;
|
||||
|
||||
class LivroPagina extends Model
|
||||
{
|
||||
protected $table = 'farmacia_livro_pagina';
|
||||
|
||||
protected $fillable = [
|
||||
'livro_id',
|
||||
'numero',
|
||||
'material_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function livro()
|
||||
{
|
||||
return $this->belongsTo(Livro::class);
|
||||
}
|
||||
|
||||
public function material()
|
||||
{
|
||||
return $this->belongsTo(Material::class);
|
||||
}
|
||||
|
||||
public function linhas()
|
||||
{
|
||||
return $this->hasMany(LivroPaginaLinha::class, 'pagina_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user