Commit c8cfcf0b authored by zhuwei's avatar zhuwei

模型

parent 616b73b4
<?php
namespace app\model;
use think\Db;
use think\Model;
class BComment extends Model
{
// 设置当前模型对应的完整数据表名称
protected $table = 'b_comment';
public function saveComment($data) {
$time = date("Y-m-d H:i:s", time());
$data['create_time'] = $time;
$data['update_time'] = $time;
return $this->insert($data);
}
}
<?php
namespace app\model;
use think\Db;
use think\Model;
class BCommentExt extends Model
{
// 设置当前模型对应的完整数据表名称
protected $table = 'b_comment_ext';
public function saveCommentExt($data) {
$time = date("Y-m-d H:i:s", time());
$data['create_time'] = $time;
$data['update_time'] = $time;
return $this->insert($data);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment