<?php
/**
 * Copy Right IJH.CC
 * Each engineer has a duty to keep the code elegant
 * $Id$
 */

if(!defined('__CORE_DIR')){
    exit("Access Denied");
}

class Mdl_Staff_Comment extends Mdl_Table
{   
  
    protected $_table = 'staff_comment';
    protected $_pk = 'id';
    protected $_cols = 'id,uid,aunt_id,order_id,star,text,dateline,clientip,type';
    
     public function create($data, $checked = false)
    {
        if (!$checked && !($data = $this->_check($data))) {
            return false;
        }
        $data['clientip'] = $data['clientip'] ? $data['clientip'] : __IP;
        $data['dateline'] = $data['dateline'] ? $data['dateline'] : __CFG::TIME;
        if ($uid = $this->db->insert($this->_table, $data, true)) {
            return $uid;
            //$this->db->Execute("INSERT INTO " . $this->table('member_fields') . "(uid) VALUES('$uid')");
        }
        
    }

}