实现通过直播间获取furry等
用户信息新增直播间房间号字段 能用了,但不是很好用
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
8
pkg/dao/model/liveroom.go
Normal file
8
pkg/dao/model/liveroom.go
Normal 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:''"`
|
||||
}
|
||||
7
pkg/dao/model/metadata.go
Normal file
7
pkg/dao/model/metadata.go
Normal 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:''"`
|
||||
}
|
||||
Reference in New Issue
Block a user