<?php

Doo::loadCore ( 'db/DooModel' );

class service_log extends DooModel {
	
	public $slid;
	public $status;
	public $mark;
	public $date;
	public $category;
	public $staffname;
	public $clientid;
	public $staffid;
	
	public $_table = 'CLD_service_log';
	public $_primarykey = 'slid';
	public $_fields = array ('slid', 'status', 'mark', 'date', 'category','staffname','clientid','staffid' );
	
	public function getServiceByClientid($clientid){
		return $this->find ( array ('where' => "clientid= '".$clientid."' ", 'desc' => 'date', 'asArray' => TRUE ) );
	}
	
	public function getUser() {
		return $this->find ( array ('asc' => 'uid', 'asArray' => TRUE ) );
	}

	public function getUserByIdList($puid){
		return $this->find ( array ('where' => "uid= '".$puid."'", 'asArray' => TRUE ) );
	}
	
}

?>