<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Notifications\Notifiable;
use Zizaco\Entrust\Traits\EntrustUserTrait;

class Alumno extends Model
{

    use SoftDeletes;
    use Notifiable;

    protected $table = "alumno";
    protected $dates = ['deleted_at'];

    protected $fillable = [
        'codigo',
        'anio_egreso',
        'egresado',
        'descripcion',
        'id_especialidad',
        'id_usuario',
        'id_ciclo',
        'id_estado_alumno',
        'id_estado_convalidacion',
    ];

    public function usuario()
    {
        return $this->hasOne('App\Model\User','id','id_usuario')->select('id', 'nombres','apellido_paterno','apellido_materno');
    }

    public function usuarios() {
     return $this->hasOne(User::class,'id','id_usuario');
    }

}
