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

package database

import (
	context "context"

	mock "github.com/stretchr/testify/mock"
	database "opencsg.com/csghub-server/builder/store/database"
)

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

type MockMemberStore_Expecter struct {
	mock *mock.Mock
}

func (_m *MockMemberStore) EXPECT() *MockMemberStore_Expecter {
	return &MockMemberStore_Expecter{mock: &_m.Mock}
}

// Add provides a mock function with given fields: ctx, orgID, userID, role
func (_m *MockMemberStore) Add(ctx context.Context, orgID int64, userID int64, role string) error {
	ret := _m.Called(ctx, orgID, userID, role)

	if len(ret) == 0 {
		panic("no return value specified for Add")
	}

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

	return r0
}

// MockMemberStore_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'
type MockMemberStore_Add_Call struct {
	*mock.Call
}

// Add is a helper method to define mock.On call
//   - ctx context.Context
//   - orgID int64
//   - userID int64
//   - role string
func (_e *MockMemberStore_Expecter) Add(ctx interface{}, orgID interface{}, userID interface{}, role interface{}) *MockMemberStore_Add_Call {
	return &MockMemberStore_Add_Call{Call: _e.mock.On("Add", ctx, orgID, userID, role)}
}

func (_c *MockMemberStore_Add_Call) Run(run func(ctx context.Context, orgID int64, userID int64, role string)) *MockMemberStore_Add_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(int64), args[2].(int64), args[3].(string))
	})
	return _c
}

func (_c *MockMemberStore_Add_Call) Return(_a0 error) *MockMemberStore_Add_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockMemberStore_Add_Call) RunAndReturn(run func(context.Context, int64, int64, string) error) *MockMemberStore_Add_Call {
	_c.Call.Return(run)
	return _c
}

// Delete provides a mock function with given fields: ctx, orgID, userID, role
func (_m *MockMemberStore) Delete(ctx context.Context, orgID int64, userID int64, role string) error {
	ret := _m.Called(ctx, orgID, userID, role)

	if len(ret) == 0 {
		panic("no return value specified for Delete")
	}

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

	return r0
}

// MockMemberStore_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
type MockMemberStore_Delete_Call struct {
	*mock.Call
}

// Delete is a helper method to define mock.On call
//   - ctx context.Context
//   - orgID int64
//   - userID int64
//   - role string
func (_e *MockMemberStore_Expecter) Delete(ctx interface{}, orgID interface{}, userID interface{}, role interface{}) *MockMemberStore_Delete_Call {
	return &MockMemberStore_Delete_Call{Call: _e.mock.On("Delete", ctx, orgID, userID, role)}
}

func (_c *MockMemberStore_Delete_Call) Run(run func(ctx context.Context, orgID int64, userID int64, role string)) *MockMemberStore_Delete_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(int64), args[2].(int64), args[3].(string))
	})
	return _c
}

func (_c *MockMemberStore_Delete_Call) Return(_a0 error) *MockMemberStore_Delete_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockMemberStore_Delete_Call) RunAndReturn(run func(context.Context, int64, int64, string) error) *MockMemberStore_Delete_Call {
	_c.Call.Return(run)
	return _c
}

// Find provides a mock function with given fields: ctx, orgID, userID
func (_m *MockMemberStore) Find(ctx context.Context, orgID int64, userID int64) (*database.Member, error) {
	ret := _m.Called(ctx, orgID, userID)

	if len(ret) == 0 {
		panic("no return value specified for Find")
	}

	var r0 *database.Member
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, int64, int64) (*database.Member, error)); ok {
		return rf(ctx, orgID, userID)
	}
	if rf, ok := ret.Get(0).(func(context.Context, int64, int64) *database.Member); ok {
		r0 = rf(ctx, orgID, userID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*database.Member)
		}
	}

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

	return r0, r1
}

// MockMemberStore_Find_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Find'
type MockMemberStore_Find_Call struct {
	*mock.Call
}

// Find is a helper method to define mock.On call
//   - ctx context.Context
//   - orgID int64
//   - userID int64
func (_e *MockMemberStore_Expecter) Find(ctx interface{}, orgID interface{}, userID interface{}) *MockMemberStore_Find_Call {
	return &MockMemberStore_Find_Call{Call: _e.mock.On("Find", ctx, orgID, userID)}
}

func (_c *MockMemberStore_Find_Call) Run(run func(ctx context.Context, orgID int64, userID int64)) *MockMemberStore_Find_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(int64), args[2].(int64))
	})
	return _c
}

func (_c *MockMemberStore_Find_Call) Return(_a0 *database.Member, _a1 error) *MockMemberStore_Find_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockMemberStore_Find_Call) RunAndReturn(run func(context.Context, int64, int64) (*database.Member, error)) *MockMemberStore_Find_Call {
	_c.Call.Return(run)
	return _c
}

// OrganizationMembers provides a mock function with given fields: ctx, orgID, pageSize, page
func (_m *MockMemberStore) OrganizationMembers(ctx context.Context, orgID int64, pageSize int, page int) ([]database.Member, int, error) {
	ret := _m.Called(ctx, orgID, pageSize, page)

	if len(ret) == 0 {
		panic("no return value specified for OrganizationMembers")
	}

	var r0 []database.Member
	var r1 int
	var r2 error
	if rf, ok := ret.Get(0).(func(context.Context, int64, int, int) ([]database.Member, int, error)); ok {
		return rf(ctx, orgID, pageSize, page)
	}
	if rf, ok := ret.Get(0).(func(context.Context, int64, int, int) []database.Member); ok {
		r0 = rf(ctx, orgID, pageSize, page)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]database.Member)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, int64, int, int) int); ok {
		r1 = rf(ctx, orgID, pageSize, page)
	} else {
		r1 = ret.Get(1).(int)
	}

	if rf, ok := ret.Get(2).(func(context.Context, int64, int, int) error); ok {
		r2 = rf(ctx, orgID, pageSize, page)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

// MockMemberStore_OrganizationMembers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OrganizationMembers'
type MockMemberStore_OrganizationMembers_Call struct {
	*mock.Call
}

// OrganizationMembers is a helper method to define mock.On call
//   - ctx context.Context
//   - orgID int64
//   - pageSize int
//   - page int
func (_e *MockMemberStore_Expecter) OrganizationMembers(ctx interface{}, orgID interface{}, pageSize interface{}, page interface{}) *MockMemberStore_OrganizationMembers_Call {
	return &MockMemberStore_OrganizationMembers_Call{Call: _e.mock.On("OrganizationMembers", ctx, orgID, pageSize, page)}
}

func (_c *MockMemberStore_OrganizationMembers_Call) Run(run func(ctx context.Context, orgID int64, pageSize int, page int)) *MockMemberStore_OrganizationMembers_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(int64), args[2].(int), args[3].(int))
	})
	return _c
}

func (_c *MockMemberStore_OrganizationMembers_Call) Return(_a0 []database.Member, _a1 int, _a2 error) *MockMemberStore_OrganizationMembers_Call {
	_c.Call.Return(_a0, _a1, _a2)
	return _c
}

func (_c *MockMemberStore_OrganizationMembers_Call) RunAndReturn(run func(context.Context, int64, int, int) ([]database.Member, int, error)) *MockMemberStore_OrganizationMembers_Call {
	_c.Call.Return(run)
	return _c
}

// UserMembers provides a mock function with given fields: ctx, userID
func (_m *MockMemberStore) UserMembers(ctx context.Context, userID int64) ([]database.Member, error) {
	ret := _m.Called(ctx, userID)

	if len(ret) == 0 {
		panic("no return value specified for UserMembers")
	}

	var r0 []database.Member
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, int64) ([]database.Member, error)); ok {
		return rf(ctx, userID)
	}
	if rf, ok := ret.Get(0).(func(context.Context, int64) []database.Member); ok {
		r0 = rf(ctx, userID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]database.Member)
		}
	}

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

	return r0, r1
}

// MockMemberStore_UserMembers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UserMembers'
type MockMemberStore_UserMembers_Call struct {
	*mock.Call
}

// UserMembers is a helper method to define mock.On call
//   - ctx context.Context
//   - userID int64
func (_e *MockMemberStore_Expecter) UserMembers(ctx interface{}, userID interface{}) *MockMemberStore_UserMembers_Call {
	return &MockMemberStore_UserMembers_Call{Call: _e.mock.On("UserMembers", ctx, userID)}
}

func (_c *MockMemberStore_UserMembers_Call) Run(run func(ctx context.Context, userID int64)) *MockMemberStore_UserMembers_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(int64))
	})
	return _c
}

func (_c *MockMemberStore_UserMembers_Call) Return(_a0 []database.Member, _a1 error) *MockMemberStore_UserMembers_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockMemberStore_UserMembers_Call) RunAndReturn(run func(context.Context, int64) ([]database.Member, error)) *MockMemberStore_UserMembers_Call {
	_c.Call.Return(run)
	return _c
}

// NewMockMemberStore creates a new instance of MockMemberStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockMemberStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMemberStore {
	mock := &MockMemberStore{}
	mock.Mock.Test(t)

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

	return mock
}
