rusty-beads 0.1.0

Git-backed graph issue tracker for AI coding agents - a Rust implementation with context store, dependency tracking, and semantic compaction
Documentation
//! Comment type definition.

use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};

/// A comment on an issue.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Comment {
    /// Unique comment ID.
    pub id: i64,
    /// Parent issue ID.
    pub issue_id: String,
    /// Comment author.
    pub author: String,
    /// Comment content.
    pub text: String,
    /// When the comment was posted.
    pub created_at: DateTime<Utc>,
}

impl Comment {
    /// Create a new comment.
    pub fn new(
        id: i64,
        issue_id: impl Into<String>,
        author: impl Into<String>,
        text: impl Into<String>,
    ) -> Self {
        Self {
            id,
            issue_id: issue_id.into(),
            author: author.into(),
            text: text.into(),
            created_at: Utc::now(),
        }
    }
}