initial commit
This commit is contained in:
28
app/Models/Question.php
Normal file
28
app/Models/Question.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Question extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'questions';
|
||||
|
||||
protected $fillable = [
|
||||
'question',
|
||||
'type',
|
||||
'options'
|
||||
];
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
public function getAnswer(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(PatientAnswer::class, 'appointment_id');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user