users_base.go 739 字节
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 TransformToUserBaseDomainModelFromPgModels(userBaseModel *models.UserBase) (*domain.UserBase, error) {
	return &domain.UserBase{
		UserBaseId:   userBaseModel.UserBaseId,
		UserInfo:     userBaseModel.UserInfo,
		Account:      userBaseModel.Account,
		Password:     userBaseModel.Password,
		Im:           userBaseModel.Im,
		RelatedUsers: userBaseModel.RelatedUser,
		Status:       userBaseModel.Status,
		Favorite:     userBaseModel.Favorite,
		CreatedAt:    userBaseModel.CreatedAt,
		UpdatedAt:    userBaseModel.UpdatedAt,
	}, nil
}