Initial commit

This commit is contained in:
易焱
2021-03-13 18:42:01 +08:00
commit d9a3c376d5
3243 changed files with 627198 additions and 0 deletions
@@ -0,0 +1,28 @@
<?php
namespace Admin\Model;
use Think\Model\RelationModel;
class CraftTemplateModel extends RelationModel{
//验证
protected $_validate=array(
//array("字段","验证规则","错误提示",["验证条件","附加条件","验证时间"]),
array("template_name","require","参数模板名称不能为空"),
);
//保存信息
public function data_save(){
//创建数据
$data=$this->create();
$this->data($data)->save();
return $data['template_id'];
}
//保存信息
public function data_add(){
//创建数据
$data=$this->create();
$id = $this->data($data)->add();
return $id;
}
}