<?php

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

class UsersActivity extends DooModel {

    public $aid;
    public $userid;
    public $money;
    public $joindate;
    public $_table = 'zh_users_activity';
    public $_primarykey = 'aid';
    public $_fields = array('aid', 'userid', 'money', 'joindate');

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

    /**
     *
     * @param type $param
     */
    public function userAdd($userid, $money) {
        if (empty($userid) || empty($money))
            return FALSE;
        $this->userid = $userid;
        $this->money = $money;
        $this->joindate = time();
        return $this->insert();
    }

}

?>