package persistence

import (
	"github.com/nexuscrm/shared/pkg/constants"
	"github.com/nexuscrm/shared/pkg/models"
)

func selectedRootRepositoryTestSchema() *models.ObjectMetadata {
	return &models.ObjectMetadata{APIName: "Issue", Fields: []models.FieldMetadata{
		{APIName: constants.FieldID, Type: constants.FieldTypeString, IsSystem: true},
		{APIName: constants.FieldIsDeleted, Type: constants.FieldTypeBoolean, IsSystem: true},
		{APIName: "Subject", Type: constants.FieldTypeString},
	}}
}

func selectedRootRepositoryTestRequest() models.QueryRequest {
	return models.QueryRequest{
		ObjectAPIName: "Issue",
		Criteria:      []models.QueryCriterion{{Field: constants.FieldID, Op: "=", Val: "ISS-1"}},
		Limit:         1,
		SkipTotalSize: true,
		SelectFields:  []string{constants.FieldID, "Subject"},
	}
}
