first
This commit is contained in:
28
app/Models/ElectionSetting.php
Normal file
28
app/Models/ElectionSetting.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class ElectionSetting extends Model
|
||||
{
|
||||
protected $guarded = [];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'registration_start_date' => 'date',
|
||||
'registration_end_date' => 'date',
|
||||
'polling_date' => 'date',
|
||||
'is_registration_open' => 'boolean',
|
||||
'is_registration_open_override' => 'boolean',
|
||||
'is_attendance_active' => 'boolean',
|
||||
];
|
||||
}
|
||||
|
||||
public function election(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Election::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user