定義大與約定

This commit is contained in:
2023-05-16 01:53:03 +08:00
parent 248b90021b
commit 287ad1f8c1

View File

@@ -8,13 +8,13 @@ import (
)
type User struct {
ID int `json:"id"`
ID int `json:"id" gorm:"primary_key"`
Name string `json:"name"`
Email string `json:"email"`
Password string `json:"-"`
Slat string `json:"-"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
}
func init() {