Commit 36d5d54c authored by zhuwei's avatar zhuwei

图片

parent b859ff6a
<?php
namespace app\model;
use think\Db;
use think\Model;
class SubletImgModel extends Model
{
// 设置当前模型对应的完整数据表名称
protected $table = 'u_sublet_img';
private $db_;
public function __construct($data = [])
{
parent::__construct($data);
$this->db_ = Db::name($this->table);
}
/**
* 保存图片
* @param $data
* @return int|string
*/
public function saveSubletImg($data) {
$time = date("Y-m-d H:i:s", time());
$data['create_time'] = $time;
$data['update_time'] = $time;
return $this->db_ ->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