use serde::{Deserialize, Serialize};

use crate::cmd::oid::ObjectId;

pub mod tag_count;
pub mod tag_delete;
pub mod tag_info;
pub mod tag_init;
pub mod tag_list;
pub mod tag_rename;
pub mod tag_summary;
pub mod tag_upmsg;

pub use tag_delete::TagDeleteParams;
pub use tag_init::TagInitParams;
pub use tag_rename::TagRenameParams;
pub use tag_upmsg::TagUpdateMessageParams;

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct TagItem {
    pub name: String,
    pub oid: ObjectId,
    pub target: ObjectId,
    pub is_annotated: bool,
    pub message: Option<String>,
    pub tagger: Option<String>,
    pub tagger_email: Option<String>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct TagSummary {
    pub total_count: usize,
}
