|
|
@ -20,7 +20,7 @@ type Message struct {
|
|
|
|
SenderUserID int64 `json:"sender_user_id"`
|
|
|
|
SenderUserID int64 `json:"sender_user_id"`
|
|
|
|
ReceiverUserID int64 `json:"receiver_user_id"`
|
|
|
|
ReceiverUserID int64 `json:"receiver_user_id"`
|
|
|
|
Type MessageT `json:"type"`
|
|
|
|
Type MessageT `json:"type"`
|
|
|
|
Breif string `json:"breif"`
|
|
|
|
Brief string `json:"brief"`
|
|
|
|
Content string `json:"content"`
|
|
|
|
Content string `json:"content"`
|
|
|
|
PostID int64 `json:"post_id"`
|
|
|
|
PostID int64 `json:"post_id"`
|
|
|
|
CommentID int64 `json:"comment_id"`
|
|
|
|
CommentID int64 `json:"comment_id"`
|
|
|
@ -34,7 +34,7 @@ type MessageFormated struct {
|
|
|
|
SenderUser *UserFormated `json:"sender_user"`
|
|
|
|
SenderUser *UserFormated `json:"sender_user"`
|
|
|
|
ReceiverUserID int64 `json:"receiver_user_id"`
|
|
|
|
ReceiverUserID int64 `json:"receiver_user_id"`
|
|
|
|
Type MessageT `json:"type"`
|
|
|
|
Type MessageT `json:"type"`
|
|
|
|
Breif string `json:"breif"`
|
|
|
|
Brief string `json:"brief"`
|
|
|
|
Content string `json:"content"`
|
|
|
|
Content string `json:"content"`
|
|
|
|
PostID int64 `json:"post_id"`
|
|
|
|
PostID int64 `json:"post_id"`
|
|
|
|
Post *PostFormated `json:"post"`
|
|
|
|
Post *PostFormated `json:"post"`
|
|
|
@ -57,7 +57,7 @@ func (m *Message) Format() *MessageFormated {
|
|
|
|
SenderUser: &UserFormated{},
|
|
|
|
SenderUser: &UserFormated{},
|
|
|
|
ReceiverUserID: m.ReceiverUserID,
|
|
|
|
ReceiverUserID: m.ReceiverUserID,
|
|
|
|
Type: m.Type,
|
|
|
|
Type: m.Type,
|
|
|
|
Breif: m.Breif,
|
|
|
|
Brief: m.Brief,
|
|
|
|
Content: m.Content,
|
|
|
|
Content: m.Content,
|
|
|
|
PostID: m.PostID,
|
|
|
|
PostID: m.PostID,
|
|
|
|
Post: &PostFormated{},
|
|
|
|
Post: &PostFormated{},
|
|
|
|