<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class RFAlumnoHistoricoPagos extends Model
{
    protected $table = 'alumno_historico_pagos';
  	protected $connection = 'escolar';
  	protected $dates = [ 'fecha_pago'];
  	protected $casts = ['fk_idAlumno'=>'varchar'];

  	public function alumno(){ return $this->belongsTo('App\RFAlumno','fk_idAlumno','id'); }
  	public function periodo(){ return $this->belongsTo('App\RFPeriodo','fk_idPeriodo','id'); }
  	public function forma_pago(){return $this->hasOne('App\RFFormaPago', 'id', 'fk_idFormaPago');}

  	/*public function observaciones(){
    	return $this->hasMany('App\RFAlumnoObservacionPago', 'fk_idHistoricoPago', 'id');
    }*/

    public function lote_pagos(){ return $this->belongsTo('App\RFLotePagos','fk_idLote','id'); }
}
