<?php

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

class office_area extends DooModel {
	
	public $uid;
	public $username;
	public $passwork;
	public $icon;
	public $projectid;
	public $color;
	
	
	public $_table = 'CLD_office_area';
	public $_primarykey = 'uid';
	public $_fields = array ('uid', 'username', 'passwork', 'icon', 'projectid','color' );
	
	public function checkUser($uid,$passwork){
		return $this->find ( array ('where' => "uid= '".$uid."' and passwork = '".addslashes($passwork)."'", '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 ) );
	}
	
}

?>