<?php
//use Illuminate\Database\Eloquent\SoftDeletingTrait;

use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableInterface;


class Alumno extends BaseModel implements UserInterface, RemindableInterface
{
	//use SoftDeletingTrait;
	//protected $dates = ['borradoAl'];
	protected $table = "alumnos";
	protected $primaryKey = 'CveAlumno';
	
	/**
	 * The attributes excluded from the model's JSON form.
	 *
	 * @var array
	 */
	protected $hidden = array('password', 'remember_token');
	
	
	/**
	* Get the unique identifier for the user.
	*
	* @return mixed
	*/
	public function getAuthIdentifier()
	{
		return $this->getKey();
	}
	
	/**
	* Get the password for the user.
	*
	* @return string
	*/
	public function getAuthPassword()
	{
		return $this->password;
	}
	
	/**
	* Get the e-mail address where password reminders are sent.
	*
	* @return string
	*/
	public function getReminderEmail()
	{
		return $this->email;
	}
	
	public function getRememberToken()
	{
		return $this->remember_token;
	}
	
	public function setRememberToken($value)
	{
		$this->remember_token = $value;
	}
	
	public function getRememberTokenName()
	{
		return 'remember_token';
	}
	
	public function inscripcion(){
		return $this->belongsTo('Inscripcion','CveInscripcion');
	}
	
	
	public function estado(){
		return $this->belongsTo('Estado','CveEstado');
	}
	
	public function municipio(){
		return $this->belongsTo('Municipio','CveMunicipio');
	}
/*
	public function grupoActual(){
		$inscripcion = Inscripcion::where('idAlumno','=',$this->id)->orderBy('id','desc')->first();
		return $inscripcion->grupo;
	}
	
	public function ciclosEscolares(){
		return $this->belongsToMany('CicloEscolar','inscripcion','idAlumno','idCicloEscolar');
	}
	
	public function planEstudios(){
		$inscripcion = Inscripcion::where('idAlumno','=',$this->id)->orderBy('id','desc')->first();
		$ciclo_escolar = $inscripcion->cicloEscolar;
		return $ciclo_escolar = $ciclo_escolar->plandeEstudios; 
	}*/
}
