<?php

//視圖模型
class CommentViewModel extends ViewModel {
	
	protected $viewFields = array(
		'comment' => array('*',
		'_type' => 'LEFT'
		),
		'model' => array(
		'name' => 'modelname',
		'tablename' => 'tablename',
		'_on' => 'comment.modelid = model.id',//_on 對應上面LEFT關聯條件
		'_type' => 'LEFT'
		),		
		'member' => array(
		'face' => 'face',//顯示字段name as model
		'nickname' => 'nickname',//顯示字段name as model
		'_on' => 'comment.userid = member.id',//_on 對應上面LEFT關聯條件
		),

	);
}

?>