12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- package model
- import "time"
- /* code 结构体 */
- type CodeData struct {
- Code string `form:"code" binding:"required"`
- Gid string `form:"gid" binding:"required"`
- Pf string `form:"pf" binding:"required"`
- Secret string `form:"secret"`
- }
- type Users struct {
- ID int `json:"id" gorm:"not null;"`
- OpenId string `json:"openId" gorm:"not null;column:openId;"`
- Pf string `json:"pf" gorm:"not null;"`
- UserId int `json:"userId" gorm:"not null;column:userId;"`
- CreatedAt time.Time `json:"createdAt" gorm:"column:createdAt;"`
- UpdatedAt time.Time `json:"updatedAt" gorm:"column:updatedAt;"`
- }
- type User struct {
- ID int `json:"id" gorm:"not null;"`
- Pf string `json:"pf" gorm:"not null;"`
- Gid string `json:"gid" gorm:"not null;"`
- UserId int `json:"userId" gorm:"not null;column:userId;"`
- CreatedAt time.Time `json:"createdAt" gorm:"column:createdAt;"`
- }
- type UserLogin struct {
- ID int `json:"id" gorm:"not null;"`
- Pf string `json:"pf" gorm:"not null;"`
- Gid string `json:"gid" gorm:"not null;"`
- UserId int `json:"userId" gorm:"not null;column:userId;"`
- LoginTime time.Time `json:"loginTime" gorm:"column:loginTime;"`
- }
- type UserOnline struct {
- ID int `json:"id" gorm:"not null;"`
- Pf string `json:"pf" gorm:"not null;"`
- Gid string `json:"gid" gorm:"not null;"`
- Type int `json:"type" gorm:"not null;"`
- UserId int `json:"userId" gorm:"not null;column:userId;"`
- LogTime time.Time `json:"logTime" gorm:"column:logTime;"`
- }
|