<?php
if (!defined("ROOT_PATH"))
{
	header("HTTP/1.1 403 Forbidden");
	exit;
}
class pjSuperServiceModel extends pjAppModel
{
	protected $primaryKey = 'id';
	
	protected $table = 'super_services';
	
	protected $schema = array(
		array('name' => 'id', 'type' => 'int', 'default' => ':NULL'),
		array('name' => 'calendar_id', 'type' => 'int', 'default' => ':NULL'),
		array('name' => 'price_from', 'type' => 'decimal', 'default' => ':NULL'),
	    array('name' => 'price_to', 'type' => 'decimal', 'default' => ':NULL'),
		array('name' => 'is_active', 'type' => 'tinyint', 'default' => 1)
	);
	
	protected $validate = array(
		'rules' => array(
			'calendar_id' => array(
				'pjActionNumeric' => true,
				'pjActionRequired' => true
			)
		)
	);
	
	public $i18n = array('name');
	
	public static function factory($attr=array())
	{
	    return new pjSuperServiceModel($attr);
	}
}
?>