<?php

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

/**
 * 用户表
 */
class Ameasure extends DooModel {

    public $pmid;
    public $pid;
    public $stid;
    public $uid;
    public $pmname;
    public $contracttotal;
    public $_table = 'jl_project_measure';
    public $_primarykey = 'pmid';
    public $_fields = array('pmid', 'pid', 'stid', 'uid', 'pmname', 'contracttotal');

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

    public function getRowAll($pid = 0) {
        if ($pid > 0) {
            return $this->find(array('where' => 'pid=?', 'param' => array($pid), 'asArray' => TRUE));
        } else {
            return $this->find(array('asArray' => TRUE));
        }
    }

}

?>