class {$module}Model extends Model { protected $insertFields = array({$data.insert_fields}); protected $updateFields = array({$data.update_fields}); protected $readonlyField = array({$data.readonly_fields}); //array(验证字段,验证规则,错误提示,[验证条件,附加规则,验证时间]) protected $_validate = array( {$data.validate} ); //array(填充字段,填充内容,[填充条件,附加规则]) protected $_auto = array ( {$data.auto} ); //'数据表字段'=>'表单字段' protected $_map = array( {$data.map} ); protected $_scope = array( 'default'=>array( 'where'=>array('is_deleted'=>'0'), 'order'=>'{$pk} DESC', {$data.scope} ), 'latest'=>array( 'where'=>array('is_deleted'=>'0'), 'order'=>'update_time DESC', ), ); }