package guild

import (
	"context"

	"bindbox-game/internal/repository/mysql/model"
)

func (s *service) GetGuild(ctx context.Context, id int64) (*model.Guild, error) {
	g, err := s.readDB.Guild.WithContext(ctx).Where(s.readDB.Guild.ID.Eq(id)).First()
	if err != nil {
		return nil, err
	}
	return g, nil
}
