OrderDetail.php
630 字节
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2020/5/14
* Time: 11:51
*/
namespace app\index\model;
use think\Model;
class OrderDetail extends Model
{
public function getCreatetimeAttr($data) {
return date('Y-m-d H:i',$data);
}
public function insertData($data){
$result = $this->insertGetId($data);
return $result;
}
public function findData($where){
$data = $this->where($where)->find();
return $data;
}
public function updateData($where,$data){
$result = $this->where($where)->update($data);
return $result;
}
}