package order

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 orderMongoAccessor struct {
	utils.AbstractAccessor[*Order] // AbstractAccessor contains the basic fields of an accessor (model, caller)
}

// New creates a new instance of the orderMongoAccessor
func NewAccessor(request *tools.APIRequest) *orderMongoAccessor {
	return &orderMongoAccessor{
		AbstractAccessor: utils.AbstractAccessor[*Order]{
			Logger:         logs.CreateLogger(tools.ORDER.String()), // Create a logger with the data type
			Request:        request,
			Type:           tools.ORDER,
			New:            func() *Order { return &Order{} },
			NotImplemented: []string{"CopyOne"},
		},
	}
}
