finished rewriting socket but it isn't working 😊

This commit is contained in:
slawk0
2025-02-11 23:03:31 +01:00
parent 248966d63f
commit e6817cb4c6
6 changed files with 214 additions and 61 deletions

View File

@@ -3,7 +3,6 @@ package model
import (
"github.com/golang-jwt/jwt/v5"
"github.com/google/uuid"
"time"
)
type UserClaims struct {
@@ -12,17 +11,17 @@ type UserClaims struct {
jwt.RegisteredClaims
}
type Contact struct {
ID int `json:"contact_id"`
ConversationID uuid.UUID `json:"conversation_id"`
UserID uuid.UUID `json:"user_id"`
Username string `json:"username"`
LastActive *time.Time `json:"last_active"`
Type string `json:"type"`
LastReadMessageID *int `json:"last_read_message_id"`
LastMessageID *int `json:"last_message_id"`
LastMessage *time.Time `json:"last_message"`
LastMessageTime *string `json:"last_message_time"`
LastMessageSender *string `json:"last_message_sender"`
ID int `json:"contact_id"`
ConversationID uuid.UUID `json:"conversation_id"`
UserID uuid.UUID `json:"user_id"`
Username string `json:"username"`
LastActive *string `json:"last_active"`
Type string `json:"type"`
LastReadMessageID *int `json:"last_read_message_id"`
LastMessageID *int `json:"last_message_id"`
LastMessage *string `json:"last_message"`
LastMessageTime *string `json:"last_message_time"`
LastMessageSender *string `json:"last_message_sender"`
}
type ContactSuggestion struct {
@@ -32,7 +31,7 @@ type ContactSuggestion struct {
type Message struct {
ID int `json:"message_id"`
Message string `json:"message"`
SentAt time.Time `json:"sent_at"`
SentAt string `json:"sent_at"`
Sender string `json:"sender"`
SenderID uuid.UUID `json:"sender_id"`
AttachmentUrl *string `json:"attachment_url"`