33 lines
1.0 KiB
Go
33 lines
1.0 KiB
Go
|
|
package threads_account
|
||
|
|
|
||
|
|
import (
|
||
|
|
mentioninboxdomain "haixun-backend/internal/model/mention_inbox/domain/usecase"
|
||
|
|
"haixun-backend/internal/types"
|
||
|
|
)
|
||
|
|
|
||
|
|
func toMentionInboxItems(items []mentioninboxdomain.MentionSummary) []types.MentionInboxItemData {
|
||
|
|
out := make([]types.MentionInboxItemData, 0, len(items))
|
||
|
|
for _, item := range items {
|
||
|
|
out = append(out, types.MentionInboxItemData{
|
||
|
|
MediaID: item.MediaID,
|
||
|
|
AuthorUsername: item.AuthorUsername,
|
||
|
|
Text: item.Text,
|
||
|
|
Permalink: item.Permalink,
|
||
|
|
Shortcode: item.Shortcode,
|
||
|
|
Timestamp: item.Timestamp,
|
||
|
|
MediaType: item.MediaType,
|
||
|
|
IsReply: item.IsReply,
|
||
|
|
IsQuotePost: item.IsQuotePost,
|
||
|
|
HasReplies: item.HasReplies,
|
||
|
|
RootPostID: item.RootPostID,
|
||
|
|
ParentID: item.ParentID,
|
||
|
|
ThreadPostText: item.ThreadPostText,
|
||
|
|
ParentReplyText: item.ParentReplyText,
|
||
|
|
ReplyReady: item.ReplyReady,
|
||
|
|
ReplyReadyMsg: item.ReplyReadyMsg,
|
||
|
|
SyncedAt: item.SyncedAt,
|
||
|
|
})
|
||
|
|
}
|
||
|
|
return out
|
||
|
|
}
|