<?php

class Goods extends Model
{

	function __construct($fromArray = array())
	{
		$this->_tableName_ = 'goods';
		parent::__construct($fromArray);
	}

	static function model()
	{
		return new self();
	}

	function getRandom($count = 6)
	{
		return $this->getAll(array(
			'order' => 'RAND()',
			'limit' => (int) $count,
		));
	}
}
