-
Notifications
You must be signed in to change notification settings - Fork 5
/
code_entity_rep_interface.go
executable file
·40 lines (35 loc) · 1.08 KB
/
code_entity_rep_interface.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package golang
var (
// 实体仓储接口模板
TPL_ENTITY_REP_INTERFACE = `
package ifce
/**
* this file is auto generated by tto v{{.global.version}} !
* if you want to modify this code,please read guide doc
* and modify code template later.
*
* guide please see https://github.com/ixre/tto
* generate time: {{.global.time}}
*/
#!target:{{.global.pkg}}/ifce/{{.table.Name}}_repo_ifce.go
import(
"{{.global.pkg}}/model"
)
type I{{.table.Title}}Repo interface{
// auto generate by gof
// Get {{.table.Comment}}
Get(primary interface{})*model.{{.table.Title}}
// GetBy {{.table.Comment}}
GetBy(where string,v ...interface{})*model.{{.table.Title}}
// Count {{.table.Comment}} by condition
Count(where string,v ...interface{})(int,error)
// Select {{.table.Comment}}
Select(where string,v ...interface{})[]*model.{{.table.Title}}
// Save {{.table.Comment}}
Save(v *model.{{.table.Title}})(int,error)
// Delete {{.table.Comment}}
Delete(primary interface{}) error
// Batch Delete {{.table.Comment}}
BatchDelete(where string,v ...interface{})(int64,error)
}`
)