Commit f62041a1 authored by zhuwei's avatar zhuwei

model

parent 261448ea
<?php
/**
* 罚款相关
* Created by PhpStorm.
* User: zhuwei
* Date: 2019年08月28日
......
<?php
namespace app\model;
use think\Db;
use think\Model;
class OAmercementImgModel extends Model
{
// 设置当前模型对应的完整数据表名称
protected $table = 'o_amercement_img';
private $db_;
public function __construct($data = [])
{
parent::__construct($data);
$this->db_ = Db::name($this->table);
}
public function saveAmercementImg($data) {
$time = date("Y-m-d H:i:s", time());
$data['create_time'] = $time;
$data['update_time'] = $time;
$data['is_del'] = 0;
return $this->db_ ->insert($data);
}
}
<?php
namespace app\model;
use think\Db;
use think\Model;
class OAmercementModel extends Model
{
// 设置当前模型对应的完整数据表名称
protected $table = 'o_amercement';
private $db_;
public function __construct($data = [])
{
parent::__construct($data);
$this->db_ = Db::name($this->table);
}
public function saveAmercement($data) {
$time = date("Y-m-d H:i:s", time());
$data['create_time'] = $time;
$data['update_time'] = $time;
$data['is_del'] = 0;
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