Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB // nolint:all
Functions ¶
func FollowAction ¶
myID 关注 toID.
Types ¶
type Follow ¶
type Follow struct { gorm.Model ID int64 `gorm:"column:id;primary_key;AUTO_INCERMENT"` FollowTime time.Time `gorm:"column:follow_time;default:CURRENT_TIMESTAMP;NOT NULL"` FromUserID int64 `gorm:"column:from_user_id;NOT NULL"` ToUserID int64 `gorm:"column:to_user_id;NOT NULL"` CreateTime time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP;NOT NULL"` UpdateTime time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP;NOT NULL"` }
type User ¶
type User struct { gorm.Model ID int64 `gorm:"column:id;primary_key;AUTO_INCREMENT"` CreateTime time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP;NOT NULL"` Name string `gorm:"column:name;unique;NOT NULL"` Password string `gorm:"column:password;NOT NULL"` Salt string `gorm:"column:salt;NOT NULL"` FollowCount int64 `gorm:"column:follow_count;default:0;NOT NULL"` FollowerCount int64 `gorm:"column:follower_count;default:0;NOT NULL"` }
Click to show internal directories.
Click to hide internal directories.