Commit aa64d736 by feixiang

生成Data模板增加创建方法

parent 873a86b7
......@@ -8,6 +8,7 @@
namespace App\Models\Data;
use App\Models\Dao\{daoName};
use App\Models\Entity\{entityName};
use Swoft\Bean\Annotation\Bean;
use Swoft\Bean\Annotation\Inject;
......@@ -26,6 +27,18 @@ class {dataName}
private ${varDaoName};
/**
* 插入数据
*
* @param array $info
* @return {entityName}
* @throws \Hdll\Services\Common\Exception\CommonException
*/
public function create(array $info) : {entityName}
{
return $this->{varDaoName}->create($info);
}
/**
* 查询一条数据
*
* @param array $condition
......
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