2020-04-29 17:15:54 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
class Appointment extends Model
|
|
|
|
{
|
2020-05-22 02:49:16 +00:00
|
|
|
public $fillable = [
|
2020-09-02 23:23:09 +00:00
|
|
|
'appointmentDescription',
|
|
|
|
'appointmentDate',
|
|
|
|
'applicationID',
|
2020-05-22 02:49:16 +00:00
|
|
|
'appointmentStatus',
|
2020-09-02 23:23:09 +00:00
|
|
|
'appointmentLocation',
|
|
|
|
'meetingNotes',
|
|
|
|
'userAccepted'
|
2020-05-22 02:49:16 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
public function application()
|
|
|
|
{
|
2020-06-26 23:32:33 +00:00
|
|
|
// FIXME: Possible bug here, where laravel looks for the wrong column in the applications table.
|
2020-05-22 02:49:16 +00:00
|
|
|
return $this->belongsTo('App\Application', 'id', 'applicationID');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setStatus($status)
|
|
|
|
{
|
|
|
|
$this->update([
|
|
|
|
'appointmentStatus' => $status
|
|
|
|
]);
|
|
|
|
}
|
2020-04-29 17:15:54 +00:00
|
|
|
}
|