<?php

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

class longle_log extends DooModel {
	
	public $logid;
	public $status;
	public $statusT;
	public $lid;
	public $sell_client;
	public $client;
	public $clientid;
	public $responsible;
	public $operator;
	public $product_id;
	public $product;
	public $category;
	public $new_key_num;
	public $mark;
	public $dateline;
	
	public $_table = 'CLD_longlelog';
	public $_primarykey = 'logid';
	public $_fields = array ('logid','lid', 'status','statusT', 'sell_client', 'client','clientid','responsible','operator','product_id','product','category','new_key_num','mark','dateline' );
	
	public function getLongleByLid($lid){
		return $this->find ( array ('where' => "lid= '".$lid."'", 'desc' => 'logid', 'asArray' => TRUE ) );
	}
	
	public function getLongleByName($name){
		return $this->find ( array ('where' => "new_key_num= '".$name."'", 'desc' => 'logid', '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 ) );
	}
	
}

?>