users.go 991 字节
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 TransformToUsersDomainModelFromPgModels(usersModel *models.Users) (*domain.Users, error) {
	return &domain.Users{
		UsersId:        usersModel.UsersId,
		CompanyId:      usersModel.CompanyId,
		UsersBaseId:    usersModel.UsersBaseId,
		UsersType:      usersModel.UsersType,
		UsersCode:      usersModel.UsersCode,
		OrganizationId: usersModel.OrganizationId,
		DepartmentId:   usersModel.DepartmentId,
		//UsersInfo:       usersModel.UsersInfo,
		UsersOrg:        usersModel.UsersOrg,
		UsersRole:       usersModel.UsersRole,
		FavoriteMenus:   usersModel.FavoriteMenus,
		CooperationInfo: usersModel.CooperationInfo,
		EnableStatus:    usersModel.EnableStatus,
		Ext:             usersModel.Ext,
		CreatedAt:       usersModel.CreatedAt,
		UpdatedAt:       usersModel.UpdatedAt,
	}, nil
}