query_set.go 967 字节
package transform

import (
	"gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/domain"
	"gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/infrastructure/pg/models"
)

func TransformToQuerySetDomainModelFromPgModels(querySetModel *models.QuerySet) (*domain.QuerySet, error) {
	return &domain.QuerySet{
		QuerySetId:      querySetModel.QuerySetId,
		Type:            querySetModel.Type,
		Flag:            querySetModel.Flag,
		Name:            querySetModel.Name,
		PinName:         querySetModel.PinName,
		ParentId:        querySetModel.ParentId,
		Status:          querySetModel.Status,
		QuerySetInfo:    querySetModel.QuerySetInfo,
		QueryComponents: querySetModel.QueryComponents,
		Sort:            querySetModel.Sort,
		CreatedAt:       querySetModel.CreatedAt,
		UpdatedAt:       querySetModel.UpdatedAt,
		DeletedAt:       querySetModel.DeletedAt,
		Context:         querySetModel.Context,
	}, nil
}