fuwencai 1 жил өмнө
parent
commit
3e352253d7

+ 1 - 1
services/model/stdlib.go

@@ -64,7 +64,7 @@ type UserDoc struct {
 	Cost            string    `json:"cost" gorm:"column:cost"`
 }
 type UserDocRes struct {
-	ID              int       `json:"id" form:"id" gorm:"primaryKey"`
+	ID              int       `json:"id" form:"id" gorm:"id"`
 	CreateAt        time.Time `json:"create_at" gorm:"create_at"` //标签autoCreateTime设置如果字段名字不为CreatAt时候自动插入当前时间
 	UpdateAt        time.Time `json:"update_at" gorm:"update_at"`
 	DeletedAt       time.Time `json:"delete_at" gorm:"column:delete_at"`