🎨 新增讲师关注功能
This commit is contained in:
13
model/app/follow.go
Normal file
13
model/app/follow.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package app
|
||||
|
||||
import "git.echol.cn/loser/lckt/global"
|
||||
|
||||
type Follow struct {
|
||||
global.GVA_MODEL
|
||||
UserId uint `json:"userId" gorm:"comment:用户ID;uniqueIndex:idx_user_teacher"`
|
||||
TeacherId uint `json:"teacherId" gorm:"comment:讲师ID;uniqueIndex:idx_user_teacher"`
|
||||
}
|
||||
|
||||
func (Follow) TableName() string {
|
||||
return "app_follow"
|
||||
}
|
||||
@@ -21,4 +21,5 @@ type TeacherInfo struct {
|
||||
NickName string `json:"nick_name" form:"nick_name"`
|
||||
Avatar string `json:"avatar" form:"avatar"`
|
||||
Des string `json:"des" form:"des"`
|
||||
Follow int64 `json:"follow" form:"follow"` // 粉丝数
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user