use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize)]
pub struct Label {
pub url: String,
pub name: String,
pub color: String,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct User {
pub login: String,
pub id: u64,
pub avatar_url: String,
pub gravatar_id: String,
pub url: String,
pub html_url: String,
pub followers_url: String,
pub following_url: String,
pub gists_url: String,
pub starred_url: String,
pub subscriptions_url: String,
pub organizations_url: String,
pub repos_url: String,
pub events_url: String,
pub received_events_url: String,
pub site_admin: bool,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Issue {
pub id: u64,
pub url: String,
pub labels_url: String,
pub comments_url: String,
pub events_url: String,
pub html_url: String,
pub number: u64,
pub state: String,
pub title: String,
pub body: String,
pub user: User,
pub labels: Vec<Label>,
pub assignee: Option<User>,
pub locked: bool,
pub comments: u64,
pub closed_at: Option<String>,
pub created_at: String,
pub updated_at: String,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Comment {
pub id: u64,
pub url: String,
pub html_url: String,
pub body: String,
pub user: User,
pub created_at: String,
pub updated_at: String,
}
#[derive(Serialize)]
pub struct IssueWithComments {
pub issue: Issue,
pub comments: Vec<Comment>,
}