<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * Class UserAccount
 *
 * @property int $employee_ID
 * @property string $user_Name
 * @property string $password
 * @property string $user_Type
 * @property string|null $last_loging_date
 * @property string|null $last_loging_time
 * @property string|null $user_pin
 * @property string|null $mobile_pin
 * @property int|null $login_pin
 *
 * @property Employee $employee
 *
 * @package App\Models
 */
class UserAccount extends Model
{
	protected $table = 'user_account';
	protected $primaryKey = 'employee_ID';
	public $incrementing = false;
	public $timestamps = false;

	protected $casts = [
		'employee_ID' => 'int',
		'login_pin' => 'int'
	];

	protected $hidden = [
		'password'
	];

	protected $fillable = [
		'user_Name',
		'password',
		'user_Type',
		'last_loging_date',
		'last_loging_time',
		'user_pin',
		'login_pin',
        'mobile_pin'
	];

	public function employee()
	{
		return $this->belongsTo(Employee::class, 'employee_ID');
	}
}
