完成用户名更新,粉丝数获取的基础功能
This commit is contained in:
10
pkg/dao/model/changelog.go
Normal file
10
pkg/dao/model/changelog.go
Normal 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
13
pkg/dao/model/fans.go
Normal 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
12
pkg/dao/model/furry.go
Normal 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"
|
||||
}
|
||||
Reference in New Issue
Block a user