<?php
|
|
namespace app\common\model\plus\business;
|
|
use app\common\model\BaseModel;
|
|
/**
|
* 名片模板
|
*/
|
class Template extends BaseModel
|
{
|
protected $name='business_card_template';
|
protected $pk='template_id';
|
public function getList($param=[]){
|
$paramL=array_merge(['listRows'=>15],$param);
|
$where=[];
|
return $this->order('create_time','desc')->where($where)->paginate($paramL);
|
}
|
public function add($data){
|
$data['app_id']=self::$app_id;
|
return $this->save($data);
|
}
|
|
/**
|
* 获取模板详情
|
* @param $template_id
|
* @return array|false|\PDOStatement|string|Template
|
* @throws \think\db\exception\DataNotFoundException
|
* @throws \think\db\exception\ModelNotFoundException
|
* @throws \think\exception\DbException
|
*/
|
public function detail($template_id)
|
{
|
return $this->where(['template_id'=>$template_id])->find();
|
}
|
}
|