<?php
class Crawler_Issue extends MY_Model
{
	const DB_TABLE = 'crawler_issues';
    const DB_TABLE_PK = 'issue_id';

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

		$this->severity = 1;
	}

	function reset()
	{
		$this->db->query("TRUNCATE TABLE `crawler_issues`");
	}

	function get($limit=0, $offset=0)
	{
		$query = $this->db->query("SELECT * FROM crawler_issues ORDER BY crawltime DESC");

		return $query->result();
	}
}
