38 lines
761 B
PHP
38 lines
761 B
PHP
<?php
|
|
|
|
namespace App\Models\Farmacia;
|
|
|
|
use App\Models\Cadastro\SujeitoAtencao\Paciente;
|
|
use App\Models\Model;
|
|
|
|
class ReceitaTratamentoInicio extends Model
|
|
{
|
|
protected $table = 'farmacia_receita_tratamento_inicio';
|
|
|
|
public $timestamps = false;
|
|
|
|
protected $casts = [
|
|
'inicio_em' => 'datetime',
|
|
'interrompido_em' => 'datetime',
|
|
'aderiu_tratamento' => 'boolean',
|
|
];
|
|
|
|
protected $fillable = [
|
|
'receita_item_id',
|
|
'paciente_id',
|
|
'inicio_em',
|
|
'interrompido_em',
|
|
'aderiu_tratamento',
|
|
];
|
|
|
|
public function receitaItem()
|
|
{
|
|
return $this->belongsTo(ReceitaItem::class);
|
|
}
|
|
|
|
public function paciente()
|
|
{
|
|
return $this->belongsTo(Paciente::class);
|
|
}
|
|
}
|