Finish the second step of work.

This commit is contained in:
zicla
2018-12-05 21:22:31 +08:00
parent ea1bd27aa8
commit b7e8a3c1a1
11 changed files with 182 additions and 93 deletions

View File

@ -14,10 +14,10 @@ type IBase interface {
}
type Base struct {
Uuid string `gorm:"primary_key" json:"uuid"`
Sort int64 `json:"sort"`
UpdateTime time.Time `json:"updateTime"`
CreateTime time.Time `json:"createTime"`
Uuid string `json:"uuid" gorm:"type:char(36);primary_key;unique"`
Sort int64 `json:"sort" gorm:"type:bigint(20) not null"`
UpdateTime time.Time `json:"updateTime" gorm:"type:timestamp not null;default:CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"`
CreateTime time.Time `json:"createTime" gorm:"type:timestamp not null;default:CURRENT_TIMESTAMP"`
}
//将 Struct 转换成map[string]interface{}类型