package services_miniprogram

import (
	"mini-chat/internal/pkg/core"
	"mini-chat/internal/pkg/logger"
	"mini-chat/internal/repository/mysql"
	"mini-chat/internal/repository/mysql/dao"
)

var _ Service = (*service)(nil)

type Service interface {
	i()

	GetAccessToken(appID, appSecret string, ctx core.Context) (string, error)
}

type service struct {
	logger  logger.CustomLogger
	writeDB *dao.Query
	readDB  *dao.Query
}

func New(logger logger.CustomLogger, db mysql.Repo) Service {
	return &service{
		logger:  logger,
		writeDB: dao.Use(db.GetDbW()),
		readDB:  dao.Use(db.GetDbR()),
	}
}

func (s *service) i() {}
