log.go 745 字节
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 TransformToLogDomainModelFromPgModels(logModel *models.Log) (*domain.Log, error) {
	return &domain.Log{
		LogId:         logModel.LogId,
		LogType:       logModel.LogType,
		SourceId:      logModel.SourceId,
		Entry:         logModel.Entry,
		ObjectName:    logModel.ObjectName,
		ObjectType:    logModel.ObjectType,
		OperationType: logModel.OperationType,
		Content:       logModel.Content,
		OperatorName:  logModel.OperatorName,
		CreatedAt:     logModel.CreatedAt,
		Context:       logModel.Context,
	}, nil
}