We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cb791c commit cd471c3Copy full SHA for cd471c3
configs/gorm.go
@@ -10,7 +10,7 @@ import (
10
11
type Base struct {
12
ID string `gorm:"primaryKey;autoIncrement:false"`
13
- Counter uint64 `gorm:"primaryKey;autoIncrement:true"`
+ Counter uint64 `gorm:"index;autoIncrement:true"`
14
CreatedAt sql.NullTime
15
UpdatedAt sql.NullTime
16
CreatedBy sql.NullString
generators/templates/model.tpl
@@ -1,11 +1,7 @@
1
package models
2
3
import (
4
- "database/sql"
5
- "time"
6
-
7
configs "{{.PackageName}}/configs"
8
- "gorm.io/gorm"
9
)
type {{.Module}} struct {
0 commit comments