package auth

import (
	memberusecase "haixun-backend/internal/model/member/domain/usecase"
	"haixun-backend/internal/types"
)

func toAuthTokenData(token *memberusecase.AuthToken) *types.AuthTokenData {
	if token == nil {
		return nil
	}
	return &types.AuthTokenData{
		AccessToken:  token.AccessToken,
		RefreshToken: token.RefreshToken,
		ExpiresIn:    token.ExpiresIn,
		UID:          token.UID,
		TokenType:    token.TokenType,
	}
}
