login_access.go
892 字节
package transform
import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/pg/models"
)
func TransformToLoginAccessDomainModelFromPgModels(loginAccessModel *models.LoginAccess) (*domain.LoginAccess, error) {
return &domain.LoginAccess{
LoginAccessId: loginAccessModel.LoginAccessId,
Account: loginAccessModel.Account,
Platform: loginAccessModel.Platform,
CompanyId: loginAccessModel.CompanyId,
OrganizationId: loginAccessModel.OrganizationId,
AccessToken: loginAccessModel.AccessToken,
RefreshToken: loginAccessModel.RefreshToken,
AccessExpired: loginAccessModel.AccessExpired,
RefreshExpired: loginAccessModel.RefreshExpired,
CreatedTime: loginAccessModel.CreatedTime,
UpdatedTime: loginAccessModel.UpdatedTime,
}, nil
}