34 lines
657 B
PHP
34 lines
657 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Casts\JalaliDatetime;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Medication extends Model
|
|
{
|
|
protected $fillable = [
|
|
'name',
|
|
'dosage_form',
|
|
'strength',
|
|
'quantity',
|
|
'timing',
|
|
'notes',
|
|
'is_default',
|
|
'is_active',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'is_default' => 'boolean',
|
|
'is_active' => 'boolean',
|
|
'quantity' => 'integer',
|
|
'created_at' => JalaliDatetime::class,
|
|
'updated_at' => JalaliDatetime::class,
|
|
];
|
|
}
|
|
}
|