use giterated_models::{repository::Repository, user::User}; use crate::operations::CommentVisibility; /// An [`Issue`]'s database representation. #[derive(Debug, sqlx::FromRow)] pub struct IssueRow { pub id: i32, #[sqlx(try_from = "String")] pub repository: Repository, #[sqlx(try_from = "String")] pub author: User, pub creation_date: i32, pub issue_name: String, pub contents: Option, } #[derive(Debug, sqlx::FromRow)] pub struct IssueCommentRow { #[sqlx(try_from = "String")] pub author: User, pub contents: Option, pub visibility: CommentVisibility, }