package mocks

import (
	"github.com/fiskerinc/cloud-services/pkg/common"
	"github.com/fiskerinc/cloud-services/pkg/db/queries"
	"github.com/go-pg/pg/v10/orm"
)

type MockUpdateManifestVersions struct {
	queries.QueryBase
	SelectResponse []common.SUMSVersion
	DBMockHelper
}

func (m *MockUpdateManifestVersions) SelectAll(options *queries.PageQueryOptions) ([]common.SUMSVersion, error) {
	return m.SelectResponse, nil
}

func (m *MockUpdateManifestVersions) SelectAllCount() (int, error) {
	return len(m.SelectResponse), nil
}

func (m *MockUpdateManifestVersions) Insert(u *common.SUMSVersion) (orm.Result, error) {
	return m.ORMResponse, nil
}

func (m *MockUpdateManifestVersions) Delete(u *common.SUMSVersion) (orm.Result, error) {
	return m.ORMResponse, nil
}

func (m *MockUpdateManifestVersions) Select(version string) (*common.SUMSVersion, error) {
	return nil, nil
}
