1234567891011121314151617181920212223 |
- <?php
- namespace app\common\model;
- use think\Db;
- class MateGoodsLog extends Base
- {
- protected $createTime = 'create_time';
- protected $updateTime = 'update_time';
- public $table = 'mate_goods_log';
- public function saveData($data){
- $data['create_time'] = date('Y-m-d H:i:s');
- $data['user_id'] = is_login();
- $ret = $this->allowField(true)->save($data);
- if(!$ret){
- $this->error = '操作失败';
- return false;
- }
- return true;
- }
- }
|