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

@ -6,9 +6,9 @@ import (
type Session struct {
Base
UserUuid string `json:"userUuid"`
Ip string `json:"ip"`
ExpireTime time.Time `json:"expireTime"`
UserUuid string `json:"userUuid" gorm:"type:char(36)"`
Ip string `json:"ip" gorm:"type:varchar(128) not null"`
ExpireTime time.Time `json:"expireTime" gorm:"type:timestamp not null;default:CURRENT_TIMESTAMP"`
}
// set User's table name to be `profiles`