<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models;

use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;

/**
 * Class DataPegawai
 *
 * @property int $id
 * @property string $anggota_id
 * @property int $status
 *
 * @property Collection|DataJabatan[] $data_jabatans
 *
 * @package App\Models
 */
class Pegawai extends Model
{
	protected $table = 'data_pegawai';
	public $timestamps = false;

	protected $casts = [
		'status' => 'int'
	];

	protected $fillable = [
		'anggota_id',
		'status'
	];

	public function jabatan()
	{
		return $this->hasMany(Jabatan::class, 'pegawai_id');
	}
}
