completed story 1.1 with QA tests and fixes
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class BlockedTime extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'block_date',
|
||||
'start_time',
|
||||
'end_time',
|
||||
'reason',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'block_date' => 'date',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if this is a full day block.
|
||||
*/
|
||||
public function isFullDay(): bool
|
||||
{
|
||||
return is_null($this->start_time) && is_null($this->end_time);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user