перенос 3 лабы

This commit is contained in:
2026-10-28 12:40:39 +03:00
parent ec540a1a72
commit 7860d81fa1
115 changed files with 12814 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
package dto
import (
"time"
"mtusi2026lab4/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),
}
}