login_access.go
842 字节
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{
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
}