user_auth.go 572 字节
package transform

import (
	"gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/domain"
	"gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/pg/models"
)

func TransformToUserAuthDomainModelFromPgModels(userAuthModel *models.UserAuth) (*domain.UserAuth, error) {
	return &domain.UserAuth{
		UserAuthId:      userAuthModel.UserAuthId,
		Users:           userAuthModel.Users,
		PhoneAuth:       userAuthModel.PhoneAuth,
		CredentialAuths: userAuthModel.CredentialAuths,
		CreateAt:        userAuthModel.CreateAt,
		UpdateAt:        userAuthModel.UpdateAt,
	}, nil
}