You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/pkg/common/db/model/user.go

25 lines
490 B

package model
import (
"Open_IM/pkg/common/db/mysql"
"context"
)
type UserModel struct {
db *mysql.User
}
2 years ago
func NewGroupUser(ctx context.Context) *UserModel {
var userModel UserModel
userModel.db = mysql.NewUserDB()
2 years ago
return &userModel
}
func (u *UserModel) Find(ctx context.Context, userIDs []string) (users []*mysql.User, err error) {
return u.db.Find(ctx, userIDs)
}
func (u *UserModel) Create(ctx context.Context, users []*mysql.User) error {
return u.db.Create(ctx, users)
}