<?php

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

/**
 * Description of newPHPClass
 *
 * @author zongheng
 */
class IncomePay extends DooModel{

    public $id;
    public $uid;
    public $type;
    public $money;
    public $comefrom;
    public $description;
    public $addtime;

    public $_table = 'zh_income_pay';
    public $_primarykey = 'id';
    public $_fields = array('id', 'uid', 'type', 'money', 'comefrom', 'description', 'addtime');

    public function __construct() {
        parent::setupModel(__CLASS__);
    }

    public function get_listbyuid($uid,$limit){
        return $this->find(array('where' => 'uid='.$uid, 'desc' => 'addtime', 'limit' => $limit, 'asArray' => TRUE));
    }
}