This commit is contained in:
Sakurasan
2023-05-07 22:42:18 +08:00
parent 0dc1d13720
commit b38a215125
2 changed files with 2 additions and 1 deletions

View File

@@ -6,7 +6,7 @@ import (
type User struct {
IsDelete bool `gorm:"default:false" json:"IsDelete"`
ID uint `gorm:"primarykey" json:"id,omitempty"`
ID uint `gorm:"primaryKey;autoIncrement" json:"id,omitempty"`
Name string `gorm:"unique;not null" json:"name,omitempty"`
Token string `gorm:"unique;not null" json:"token,omitempty"`
CreatedAt time.Time `json:"createdAt,omitempty"`