на оценку 5

This commit is contained in:
2026-11-10 16:21:46 +03:00
parent 276dbdad8a
commit 7110afc598
170 changed files with 21149 additions and 30 deletions
+21
View File
@@ -0,0 +1,21 @@
package dto
import (
"time"
"mtusi2026lab5/internal/domain"
)
type SessionResponse struct {
Token string `json:"token"`
TokenType string `json:"token_type"`
ExpiresAt time.Time `json:"expires_at"`
User UserResponse `json:"user"`
}
func SessionFromDomain(session domain.Session) SessionResponse {
return SessionResponse{
Token: session.Token, TokenType: session.TokenType, ExpiresAt: session.ExpiresAt,
User: UserFromDomain(session.User),
}
}