<?php

namespace app\Http\Models;

use Cartalyst\Sentinel\Users\EloquentUser as CartalystUser;

class Users extends CartalystUser
{
    protected $table = 'users';
    protected $fillable = ['id','email','nik','password','token','permissions','last_login','nama','level_user','active','foto','created_at','updated_at'];
    protected $loginNames = ['email', 'nik'];

    public function bidan(){
    	return $this->hasOne('App\Http\Models\Bidan','users_id');
    }
    public function admin(){
    	return $this->hasOne('App\Http\Models\Admin','users_id');
    }
}
