<?php
/**
 * Created by IntelliJ IDEA.
 * User: DennysO
 * Date: 6/3/2015
 * Time: 11:10 AM
 */
require_once "generic.php";

class StudentConflicts extends Generic
{
	protected $primaryKey = 'id';
    protected $table = 'judgestudentconflicts';
    protected $fillable = ['id', 'judgeid', 'studentid', 'termid', 'created', 'lastupdated'];

    public function getConflicts($judgeid)
    {
    	$termid = (new Terms())->getActiveTerm()->id;
        $table = new StudentConflicts();
        $table = $table->select('judgeid', 'studentid')
                	   ->where('termid', $termid)
                	   ->where('judgeid', $judgeid)
			           ->get();

        return $table;

    }
}