<?php 
/*
　* @$Id
　* @
　* @Ver: 2.0
　* @Create: 2009-11-18 8:10
　* @Modify: 
　* @Author: CPWEB http://www.cpweb.net.cn
　* @Copyright (C) 2008 www.cpweb.net.cn. All Rights Reserved.
　* @License CPWEB is free software and use is subject to license terms
　*/
import('RelationModel');
class PermissionsModel extends RelationModel{
	protected $_validate=array(
		array('valueing','require','值必须',0,'',3),
	);
	public $_link=array(
		'type_values_i'=>array(
			'mapping_type'=>BELONGS_TO,
			'class_name'=>'Type',
			'foreign_key'=>'type_id_i',
			'mapping_fields'=>'type_values',
		),
		'type_values_ii'=>array(
			'mapping_type'=>BELONGS_TO,
			'class_name'=>'Type',
			'foreign_key'=>'type_id_ii',
			'mapping_fields'=>'type_values',
		),
	);
	/*
	protected $viewFields = array(
		'Permissions'=>array('id','type_id_i','value_i','type_id_ii','value_ii','valueing'),
		'Type'=>array('type_values'=>'type_values_i','_on'=>'Permissions.type_id_i=Type.id'),
		'Type'=>array('type_values'=>'type_values_ii','_on'=>'Permissions.type_id_ii=Type.id'),
		);*/
}
?>