up_chain.go 653 字节
package transform

import (
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-user/pkg/domain"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-user/pkg/infrastructure/pg/models"
)

func TransformToUpChainDomainModelFromPgModels(upChainModel *models.UpChain) (*domain.UpChain, error) {
	return &domain.UpChain{
		UpChainId:     upChainModel.UpChainId,
		Source:        upChainModel.Source,
		PrimaryId:     upChainModel.PrimaryId,
		IssueId:       upChainModel.IssueId,
		Data:          upChainModel.Data,
		Hash:          upChainModel.Hash,
		UpChainStatus: upChainModel.UpChainStatus,
		CreatedAt:     upChainModel.CreatedAt,
	}, nil
}