完成用户名更新,粉丝数获取的基础功能

This commit is contained in:
2022-12-20 21:45:52 +08:00
commit 511d889557
28 changed files with 2084 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
package model
import "gorm.io/gorm"
type Changelog struct {
gorm.Model
Operation string `gorm:"index;not null;default:''"`
Target string `gorm:"index;not null;default:''"`
Result string `gorm:"not null;default:''"`
}

13
pkg/dao/model/fans.go Normal file
View File

@@ -0,0 +1,13 @@
package model
import "gorm.io/gorm"
type Fans struct {
gorm.Model
UID uint `gorm:"index;not null"`
Fans uint `gorm:"index;not null;default:0"`
}
func (Fans) TableName() string {
return "fans"
}

12
pkg/dao/model/furry.go Normal file
View File

@@ -0,0 +1,12 @@
package model
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"`
}
func (Furry) TableName() string {
return "furries"
}