MM-28247 Threads metadata table (#15571)

Этот коммит содержится в:
Eli Yukelzon
2020-10-01 18:48:38 +03:00
коммит произвёл GitHub
родитель 10961f9500
Коммит 595248b10e
17 изменённых файлов: 1007 добавлений и 9 удалений

24
model/thread.go Обычный файл
Просмотреть файл

@@ -0,0 +1,24 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
package model
import (
"encoding/json"
)
type Thread struct {
PostId string `json:"id"`
ReplyCount int64 `json:"reply_count"`
LastReplyAt int64 `json:"last_reply_at"`
Participants StringArray `json:"participants"`
}
func (o *Thread) ToJson() string {
b, _ := json.Marshal(o)
return string(b)
}
func (o *Thread) Etag() string {
return Etag(o.PostId, o.LastReplyAt)
}