feat: add rpc gate way command

This commit is contained in:
zhuyasen
2022-11-08 21:09:17 +08:00
parent 169d63cfc0
commit 022bb99323
9 changed files with 386 additions and 23 deletions

View File

@@ -176,11 +176,20 @@ func (t tmplField) GoTypeZero() string {
return t.GoType
}
// AddOne 加一
// AddOne counter
func (t tmplField) AddOne(i int) int {
return i + 1
}
// AddOneWithTag counter and add id tag
func (t tmplField) AddOneWithTag(i int) string {
if t.ColName == "id" {
return fmt.Sprintf(`%d [(tagger.tags) = "uri:\"id\"" ]`, i+1)
}
return fmt.Sprintf("%d", i+1)
}
const (
__mysqlModel__ = "__mysqlModel__" //nolint
__type__ = "__type__" //nolint