rubbishclass-srv/user/user-model.go

24 lines
625 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package user
import (
"time"
)
type User struct {
ID string `gorm:"varchar(50);primary_key"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt *time.Time `gorm:"index"`
Username string `gorm:"type:varchar(20);"`
}
type UserSession struct {
OpenID string `gorm:"type:varchar(50);primary_key;"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt *time.Time
ExpiredAt time.Time
SessionKey string `gorm:"type:varchar(50);index;"` // 会话密钥
UnionID string `gorm:"type:varchar(50);"` // 用户在开放平台的唯一标识符在满足UnionID下发条件的情况下会返回
}