first
This commit is contained in:
74
app/Models/PusatMengundi.php
Normal file
74
app/Models/PusatMengundi.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Database\Factories\PusatMengundiFactory;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class PusatMengundi extends Model
|
||||
{
|
||||
/** @use HasFactory<PusatMengundiFactory> */
|
||||
use HasFactory, SoftDeletes;
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
public function election(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Election::class);
|
||||
}
|
||||
|
||||
public function dun(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Dun::class);
|
||||
}
|
||||
|
||||
public function daerahMengundi(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(DaerahMengundi::class);
|
||||
}
|
||||
|
||||
public function saluranMengundis(): HasMany
|
||||
{
|
||||
return $this->hasMany(SaluranMengundi::class);
|
||||
}
|
||||
|
||||
public function positionQuotas(): HasMany
|
||||
{
|
||||
return $this->hasMany(PositionQuota::class);
|
||||
}
|
||||
|
||||
public function applications(): HasMany
|
||||
{
|
||||
return $this->hasMany(Application::class);
|
||||
}
|
||||
|
||||
public function policeEscorts(): HasMany
|
||||
{
|
||||
return $this->hasMany(PoliceEscort::class);
|
||||
}
|
||||
|
||||
public function kkmRepresentatives(): HasMany
|
||||
{
|
||||
return $this->hasMany(KkmRepresentative::class);
|
||||
}
|
||||
|
||||
public function jkmRepresentatives(): HasMany
|
||||
{
|
||||
return $this->hasMany(JkmRepresentative::class);
|
||||
}
|
||||
|
||||
public function staffAssignments(): HasMany
|
||||
{
|
||||
return $this->hasMany(StaffAssignment::class);
|
||||
}
|
||||
|
||||
public function wheelchairAllocation(): HasOne
|
||||
{
|
||||
return $this->hasOne(WheelchairAllocation::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user