package discount

import (
	"cloud.o-forge.io/core/oc-lib/logs"
	"cloud.o-forge.io/core/oc-lib/models/utils"
	"cloud.o-forge.io/core/oc-lib/tools"
)

type discountMongoAccessor struct {
	utils.AbstractAccessor[*Discount]
}

func NewAccessor(request *tools.APIRequest) *discountMongoAccessor {
	return &discountMongoAccessor{
		AbstractAccessor: utils.AbstractAccessor[*Discount]{
			Logger:  logs.CreateLogger(tools.DISCOUNT.String()),
			Request: request,
			Type:    tools.DISCOUNT,
			New:     func() *Discount { return &Discount{} },
		},
	}
}
