实现通过直播间获取furry等

用户信息新增直播间房间号字段

能用了,但不是很好用
This commit is contained in:
2022-12-25 18:06:03 +08:00
parent 511d889557
commit 4f44e60168
24 changed files with 2919 additions and 783 deletions

View File

@@ -67,6 +67,8 @@ func autoMigrate() {
var err error
err = db.AutoMigrate(&model.Changelog{})
err = db.AutoMigrate(&model.Fans{})
err = db.AutoMigrate(&model.Metadata{})
err = db.AutoMigrate(&model.LiveRoom{})
if err != nil {
return
}

View File

@@ -1,10 +1,20 @@
package model
const (
StatusOK = iota
StatusIgnore
StatusAccountClosed
StatusPendingVideo
StatusPendingLive
StatusUntracked
)
type Furry struct {
ID uint `gorm:"primaryKey"`
UID uint `gorm:"uniqueIndex;not null"`
Name string `gorm:"index;not null;default:''"`
Status int `gorm:"index;not null;default:0"`
ID uint `gorm:"primaryKey"`
UID uint `gorm:"uniqueIndex;not null"`
Name string `gorm:"index;not null;default:''"`
Status int `gorm:"index;not null;default:0"`
LiveRoomID uint `gorm:"index;not null;default:0"`
}
func (Furry) TableName() string {

View File

@@ -0,0 +1,8 @@
package model
type LiveRoom struct {
ID uint `gorm:"primaryKey"`
RoomID uint `gorm:"uniqueIndex;not null"`
Title string `gorm:"not null;default:''"`
Tags string `gorm:"not null;default:''"`
}

View File

@@ -0,0 +1,7 @@
package model
type Metadata struct {
ID uint `gorm:"primaryKey"`
Key string `gorm:"uniqueIndex;not null"`
Value string `gorm:"not null;default:''"`
}