offline-twitter/pkg/scraper/notification.go

35 lines
866 B
Go
Raw Normal View History

2024-08-25 16:27:49 -07:00
package scraper
type NotificationID string
type NotificationType int
const (
NOTIFICATION_TYPE_LIKE = iota + 1
NOTIFICATION_TYPE_RETWEET
NOTIFICATION_TYPE_QUOTE_TWEET
NOTIFICATION_TYPE_REPLY
NOTIFICATION_TYPE_FOLLOW
NOTIFICATION_TYPE_MENTION
NOTIFICATION_TYPE_USER_IS_LIVE
NOTIFICATION_TYPE_POLL_ENDED
NOTIFICATION_TYPE_LOGIN
NOTIFICATION_TYPE_COMMUNITY_PINNED_POST
NOTIFICATION_TYPE_RECOMMENDED_POST
)
2024-08-25 16:27:49 -07:00
type Notification struct {
2024-08-25 22:54:18 -07:00
ID NotificationID `db:"id"`
Type int `db:"type"`
SentAt Timestamp `db:"sent_at"`
SortIndex int64 `db:"sort_index"`
UserID UserID `db:"user_id"` // recipient of the notification
2024-08-25 16:27:49 -07:00
2024-08-25 22:54:18 -07:00
ActionUserID UserID `db:"action_user_id"`
ActionTweetID TweetID `db:"action_tweet_id"`
ActionRetweetID TweetID `db:"action_retweet_id"`
2024-08-25 16:27:49 -07:00
TweetIDs []TweetID
UserIDs []UserID
}