62 lines
1.4 KiB
PHP
62 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace Modules\Consultation\app\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Modules\Consultation\Database\factories\ConsultationFactory;
|
|
|
|
class Consultation extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
const AGE_GROUP_OPTIONS = [
|
|
1 => 'Age 18-24',
|
|
2 => 'Age 25-34',
|
|
3 => 'Age 35-44',
|
|
4 => 'Age 45-54',
|
|
5 => 'Age 55 and above',
|
|
// 6 => 'Age 65-74',
|
|
// 7 => 'Age 75 and Up'
|
|
];
|
|
|
|
const PROCEDURE_OPTIONS = [
|
|
1 => 'Hair Transplant',
|
|
2 => 'Beard Transplant',
|
|
3 => 'Eyebrow Transplant',
|
|
4 => 'Platelet Rich Plasma Therapy (PRP)',
|
|
5 => 'Growth Factor Concentrate Therapy (GFC)'
|
|
];
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*/
|
|
protected $fillable = [
|
|
'uuid',
|
|
'name',
|
|
'email',
|
|
'contact_no',
|
|
'age_group',
|
|
'procedure_of_interest',
|
|
'subject',
|
|
'message',
|
|
'is_aggrement',
|
|
];
|
|
|
|
protected static function newFactory(): ConsultationFactory
|
|
{
|
|
//return ConsultationFactory::new();
|
|
}
|
|
|
|
public function ageGroupOption()
|
|
{
|
|
return self::AGE_GROUP_OPTIONS[$this->age_group];
|
|
}
|
|
|
|
|
|
public function procedureOfInterestOption()
|
|
{
|
|
return self::PROCEDURE_OPTIONS[$this->procedure_of_interest];
|
|
}
|
|
}
|