/*
 * Copyright 2026 Oleg Borodin <onborodin@gmail.com>
 *
 * This work is published and licensed under a Creative Commons
 * Attribution-NonCommercial-NoDerivatives 4.0 International License.
 *
 * Distribution of this work is permitted, but commercial use and
 * modifications are strictly prohibited.
 */
package operator

import (
	"mstore/app/logger"
	"mstore/app/maindb"
	"mstore/app/storage"
)

type OperatorParams struct {
	MainDB *maindb.Database
	Store  *storage.Storage
}

type Operator struct {
	mdb   *maindb.Database
	store *storage.Storage
	logg  *logger.Logger
}

func NewOperator(params *OperatorParams) (*Operator, error) {
	var err error
	oper := &Operator{
		mdb:   params.MainDB,
		store: params.Store,
	}
	oper.logg = logger.NewLoggerWithSubject("operator")
	return oper, err
}
