// Code generated by mockery v2.14.1. DO NOT EDIT.

package mocks

import (
	context "context"

	entities "github.com/UpmeshLTD/urus-aio/infrastructure/db/entities"
	dto "github.com/UpmeshLTD/urus-aio/paid-order/service/dto"

	mock "github.com/stretchr/testify/mock"
)

// Repository is an autogenerated mock type for the Repository type
type Repository struct {
	mock.Mock
}

// Create provides a mock function with given fields: ctx, _a1
func (_m *Repository) Create(ctx context.Context, _a1 *entities.Fulfillment) (*entities.Fulfillment, error) {
	ret := _m.Called(ctx, _a1)

	var r0 *entities.Fulfillment
	if rf, ok := ret.Get(0).(func(context.Context, *entities.Fulfillment) *entities.Fulfillment); ok {
		r0 = rf(ctx, _a1)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*entities.Fulfillment)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, *entities.Fulfillment) error); ok {
		r1 = rf(ctx, _a1)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Delete provides a mock function with given fields: ctx, id
func (_m *Repository) Delete(ctx context.Context, id string) error {
	ret := _m.Called(ctx, id)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
		r0 = rf(ctx, id)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// DeleteBatch provides a mock function with given fields: ctx, ids
func (_m *Repository) DeleteBatch(ctx context.Context, ids []string) error {
	ret := _m.Called(ctx, ids)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, []string) error); ok {
		r0 = rf(ctx, ids)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// Get provides a mock function with given fields: ctx, id
func (_m *Repository) Get(ctx context.Context, id string) (*entities.Fulfillment, error) {
	ret := _m.Called(ctx, id)

	var r0 *entities.Fulfillment
	if rf, ok := ret.Get(0).(func(context.Context, string) *entities.Fulfillment); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*entities.Fulfillment)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = rf(ctx, id)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetByIDs provides a mock function with given fields: ctx, ids
func (_m *Repository) GetByIDs(ctx context.Context, ids []string) ([]*entities.Fulfillment, error) {
	ret := _m.Called(ctx, ids)

	var r0 []*entities.Fulfillment
	if rf, ok := ret.Get(0).(func(context.Context, []string) []*entities.Fulfillment); ok {
		r0 = rf(ctx, ids)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*entities.Fulfillment)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok {
		r1 = rf(ctx, ids)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetFulfillmentEstimatedFees provides a mock function with given fields: ctx, courierDeliveryPlanID
func (_m *Repository) GetFulfillmentEstimatedFees(ctx context.Context, courierDeliveryPlanID int64) ([]*entities.FulfillmentEstimatedFee, error) {
	ret := _m.Called(ctx, courierDeliveryPlanID)

	var r0 []*entities.FulfillmentEstimatedFee
	if rf, ok := ret.Get(0).(func(context.Context, int64) []*entities.FulfillmentEstimatedFee); ok {
		r0 = rf(ctx, courierDeliveryPlanID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*entities.FulfillmentEstimatedFee)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
		r1 = rf(ctx, courierDeliveryPlanID)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetList provides a mock function with given fields: ctx, workspaceID, req
func (_m *Repository) GetList(ctx context.Context, workspaceID string, req *dto.GetFulfillmentsRequest) ([]*entities.Fulfillment, int64, error) {
	ret := _m.Called(ctx, workspaceID, req)

	var r0 []*entities.Fulfillment
	if rf, ok := ret.Get(0).(func(context.Context, string, *dto.GetFulfillmentsRequest) []*entities.Fulfillment); ok {
		r0 = rf(ctx, workspaceID, req)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*entities.Fulfillment)
		}
	}

	var r1 int64
	if rf, ok := ret.Get(1).(func(context.Context, string, *dto.GetFulfillmentsRequest) int64); ok {
		r1 = rf(ctx, workspaceID, req)
	} else {
		r1 = ret.Get(1).(int64)
	}

	var r2 error
	if rf, ok := ret.Get(2).(func(context.Context, string, *dto.GetFulfillmentsRequest) error); ok {
		r2 = rf(ctx, workspaceID, req)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

// GetWithAssociates provides a mock function with given fields: ctx, id
func (_m *Repository) GetWithAssociates(ctx context.Context, id string) (*entities.Fulfillment, error) {
	ret := _m.Called(ctx, id)

	var r0 *entities.Fulfillment
	if rf, ok := ret.Get(0).(func(context.Context, string) *entities.Fulfillment); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*entities.Fulfillment)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = rf(ctx, id)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Update provides a mock function with given fields: ctx, id, maps
func (_m *Repository) Update(ctx context.Context, id string, maps map[string]interface{}) error {
	ret := _m.Called(ctx, id, maps)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, map[string]interface{}) error); ok {
		r0 = rf(ctx, id, maps)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

type mockConstructorTestingTNewRepository interface {
	mock.TestingT
	Cleanup(func())
}

// NewRepository creates a new instance of Repository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewRepository(t mockConstructorTestingTNewRepository) *Repository {
	mock := &Repository{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}
