代码初始化
This commit is contained in:
26
application/api/model/Page.php
Normal file
26
application/api/model/Page.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\model;
|
||||
|
||||
use think\Db;
|
||||
use think\Model;
|
||||
|
||||
class Page extends Model
|
||||
{
|
||||
protected $table = 'fa_vs_page';
|
||||
|
||||
public function get_page($id)
|
||||
{
|
||||
$reslut = $this->where('aid', $id)->where('delete_time', 0)->find();
|
||||
return $reslut;
|
||||
}
|
||||
|
||||
/*
|
||||
* 添加页面
|
||||
*/
|
||||
public function add_page($data){
|
||||
$data['createtime'] = time();
|
||||
$res = $this->insertGetId($data);
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user