Files
Global-Jain/app/Models/Sant.php
2025-11-05 10:37:10 +05:30

67 lines
1.6 KiB
PHP

<?php
namespace App\Models;
use App\Traits\HasKarmaPoint;
use Illuminate\Database\Eloquent\Model;
use App\Models\Traits\Sant\Scopes\SantScope;
use App\Models\Traits\Sant\Methods\SantMethods;
use App\Models\Traits\Sant\Attributes\SantAttributes;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use App\Models\Traits\Sant\Relationships\SantRelationships;
class Sant extends Model
{
use HasFactory, SantRelationships, SantMethods, SantAttributes, SantScope, HasKarmaPoint;
/*
* Pseudo-fields that get added to the models when the models are exported to json.
*/
protected $appends = ['age', 'diksha_year', 'is_user_following', 'is_approved', 'is_in_review', 'is_owner', 'upcoming_vihar_count', 'current_chaturmas_count'];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'user_id',
'name',
'father_name',
'mother_name',
'guru_name',
'gender',
'avatar',
'honor',
'qualification',
'dharma_id',
'sampraday_id',
'guru_id',
'birth_date',
'diksha_date',
'diksha_place',
'diksha_place_latitude',
'diksha_place_longitude',
'about',
'status',
'verification_status',
'description',
'profile_statistics',
'profile_verified_at',
'created_by',
'updated_by',
'reviewed_fields'
];
protected $guarded = [
'id',
];
protected $casts = [
'honor' => 'array',
'reviewed_fields' => 'json',
'profile_statistics' => 'json'
];
}