package rolesdb

import (
	"github.com/tech/sendico/pkg/db/template"
	"github.com/tech/sendico/pkg/mlogger"
	"github.com/tech/sendico/pkg/model"
	"github.com/tech/sendico/pkg/mservice"
	"go.mongodb.org/mongo-driver/v2/mongo"
)

type RolesDB struct {
	template.DBImp[*model.RoleDescription]
}

func Create(logger mlogger.Logger, db *mongo.Database) (*RolesDB, error) {
	p := &RolesDB{
		DBImp: *template.Create[*model.RoleDescription](logger, mservice.Roles, db),
	}

	return p, nil
}
