63 lines
1.8 KiB
Go
63 lines
1.8 KiB
Go
package domain
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type RawMessage struct {
|
|
ID UUID `bson:"id"`
|
|
Message string `bson:"message,omitempty"`
|
|
ImageUrl string `bson:"image_url,omitempty"`
|
|
ChatID int `bson:"chat_id"`
|
|
UserID int `bson:"user_id"`
|
|
CreatedAt time.Time `bson:"created_at"`
|
|
AnswerID UUID `bson:"answer_id,omitempty"`
|
|
AnswerMessage string `bson:"answer_message,omitempty"`
|
|
AnswerImageUrl string `bson:"answer_image_url,omitempty"`
|
|
}
|
|
|
|
type Message struct {
|
|
ID UUID `json:"id"`
|
|
Message string `json:"message,omitempty"`
|
|
ImageUrl string `json:"image_url,omitempty"`
|
|
ChatID int `json:"chat_id"`
|
|
UserID int `json:"user_id"`
|
|
Username string `json:"username"`
|
|
AvatarImage string `json:"avatar_image"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
AnswerID UUID `json:"answer_id,omitempty"`
|
|
AnswerMessage string `json:"answer_message,omitempty"`
|
|
AnswerImageUrl string `json:"answer_image_url,omitempty"`
|
|
}
|
|
|
|
type SendMessage struct {
|
|
Flag string `json:"flag"`
|
|
Message string `json:"message"`
|
|
ImageUrl string `json:"image_url,omitempty"`
|
|
Answer UUID `json:"answer,omitempty"`
|
|
}
|
|
|
|
type DeleteMessage struct {
|
|
Flag string `json:"flag"`
|
|
UserID int `json:"user_id"`
|
|
ID UUID `json:"id"`
|
|
}
|
|
|
|
type EditMessage struct {
|
|
Flag string `json:"flag"`
|
|
UserID int `json:"user_id"`
|
|
ID UUID `json:"id"`
|
|
NewMessage string `json:"new_message,omitempty"`
|
|
NewImageUrl string `json:"new_image_url,omitempty"`
|
|
}
|
|
|
|
type PinMessage struct {
|
|
Flag string `json:"flag"`
|
|
ID UUID `json:"id"`
|
|
UserID int `json:"user_id"`
|
|
}
|
|
|
|
type UnpinMessage struct {
|
|
Flag string `json:"flag"`
|
|
ID UUID `json:"id"`
|
|
}
|