revolt_database/models/channel_unreads/
model.rs

1auto_derived!(
2    /// Channel Unread
3    pub struct ChannelUnread {
4        /// Composite key pointing to a user's view of a channel
5        #[serde(rename = "_id")]
6        pub id: ChannelCompositeKey,
7
8        /// Id of the last message read in this channel by a user
9        #[serde(skip_serializing_if = "Option::is_none")]
10        pub last_id: Option<String>,
11        /// Array of message ids that mention the user
12        #[serde(skip_serializing_if = "Option::is_none")]
13        pub mentions: Option<Vec<String>>,
14    }
15
16    /// Composite primary key consisting of channel and user id
17    #[derive(Hash)]
18    pub struct ChannelCompositeKey {
19        /// Channel Id
20        pub channel: String,
21        /// User Id
22        pub user: String,
23    }
24);