29 lines
668 B
PHP
29 lines
668 B
PHP
<?php
|
|
|
|
namespace App\Models\Sppm;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class PetugasAssignment extends Model
|
|
{
|
|
protected $connection = 'sppm';
|
|
protected $table = 'petugas_assignments';
|
|
protected $guarded = [];
|
|
|
|
public function pusatMengundi(): BelongsTo
|
|
{
|
|
return $this->belongsTo(PusatMengundi::class, 'pusat_mengundi_id');
|
|
}
|
|
|
|
public function saluran(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Saluran::class, 'saluran_id');
|
|
}
|
|
|
|
public function jawatan(): BelongsTo
|
|
{
|
|
return $this->belongsTo(JawatanTetapan::class, 'jawatan_tetapan_id');
|
|
}
|
|
}
|