Error code standardization

This commit is contained in:
skiffer-git
2023-02-21 14:38:01 +08:00
parent 9e4b59034d
commit ae40c8c8c0
5 changed files with 22 additions and 25 deletions
+2 -4
View File
@@ -12,10 +12,8 @@ type BlackGorm struct {
DB *gorm.DB
}
func NewBlackGorm(db *gorm.DB) *BlackGorm {
var black BlackGorm
black.DB = db
return &black
func NewBlackGorm(db *gorm.DB) relation.BlackModelInterface {
return &BlackGorm{db}
}
func (b *BlackGorm) Create(ctx context.Context, blacks []*relation.BlackModel) (err error) {
-5
View File
@@ -8,11 +8,6 @@ import (
"gorm.io/gorm"
)
type FriendUser struct {
FriendGorm
Nickname string `gorm:"column:name;size:255"`
}
type FriendGorm struct {
DB *gorm.DB
}