first
This commit is contained in:
48
app/Models/Attendance.php
Normal file
48
app/Models/Attendance.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class Attendance extends Model
|
||||
{
|
||||
protected $guarded = [];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'check_in_time' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
public function election(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Election::class);
|
||||
}
|
||||
|
||||
public function staffAssignment(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(StaffAssignment::class);
|
||||
}
|
||||
|
||||
public function pusatMengundi(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(PusatMengundi::class);
|
||||
}
|
||||
|
||||
public function saluranMengundi(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(SaluranMengundi::class);
|
||||
}
|
||||
|
||||
public function position(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Position::class);
|
||||
}
|
||||
|
||||
public function recordedBy(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'recorded_by_user_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user