//! Read cursor state derived from `athena.chat_room_members`.

use serde::{Deserialize, Serialize};

use crate::ids::{MessageId, RoomId, UserId};

/// Per-user read position within a room.
///
/// Persisted on [`crate::domain::member::RoomMember`] and updated via
/// [`crate::repo::traits::ChatRepository::mark_read_up_to`].
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ReadCursor {
    pub room_id: RoomId,
    pub user_id: UserId,
    pub last_read_seq: i64,
    pub last_read_message_id: Option<MessageId>,
}
