<?php namespace App\Models;

use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Auth;

class pagosmantenimientos extends Sximo  {
	
	protected $table = 'mantenimientopago';
	protected $primaryKey = 'ID';

	public function __construct() {
		parent::__construct();
		
	}

	public static function querySelect(  ){
		
		return "  SELECT mantenimientopago.* FROM mantenimientopago  ";
	}	

	public static function queryWhere(  ){
	    
	      $id = Auth::id();

		$dbcon = 0;
		$sql = \DB::table('tb_users')->where('id',$id)->get();
		if(count($sql)){
			$row = $sql[0];
			$Email =$row->email;
		}	
	    
	    
		
		return "  WHERE mantenimientopago.ID IS NOT NULL AND mantenimientopago.Email='$Email' AND mantenimientopago.Medestatus ='1' ";
	}
	
	public static function queryGroup(){
		return "  ";
	}
	

}
