<?php 
	class CaresViewModel extends ViewModel{
		public $viewFields = array(
			'customer_cares'=>array('care_id','subject','care_time','type','customer_id','contacts_id','care_time','_type'=>'LEFT'),
			'role'=>array('user_id', 'role_id', 'position_id', '_on'=>'role.role_id = customer_cares.owner_role_id', '_type'=>'LEFT'),
			'user'=>array('name'=>'to_name','weixinid','category_id', 'sex', 'address', 'email', 'telephone', '_on'=>'user.user_id=role.user_id', '_type'=>'LEFT'),
			'customer'=>array('name'=>'customer_name', '_on'=>'customer.customer_id = customer_cares.customer_id',  '_type'=>'LEFT'),
			'contacts'=>array('name'=>'contacts_name', '_on'=>'contacts.contacts_id = customer_cares.contacts_id',  '_type'=>'LEFT')
		);

	}