code refactor, added contact post route
This commit is contained in:
@@ -1,9 +1,23 @@
|
||||
package model
|
||||
|
||||
import "github.com/golang-jwt/jwt/v5"
|
||||
import (
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type UserClaims struct {
|
||||
Username string `json:"username"`
|
||||
UserId string `json:"user_id"`
|
||||
UserID string `json:"user_id"`
|
||||
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"`
|
||||
Type string `json:"type"`
|
||||
LastMessageID int `json:"last_message_id"`
|
||||
LastMessage string `json:"last_message"`
|
||||
LastMessageTime string `json:"last_message_time"`
|
||||
LastMessageSender string `json:"last_message_sender"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user