JavaScript is disabled, refresh for a better experience. ambee/giterated

ambee/giterated

Git repository hosting, collaboration, and discovery for the Fediverse.

Fucking whatever there you go

Amber - ⁨2⁩ years ago

parent: tbd commit: ⁨57c2ca5

⁨plugins/giterated-issues/src/db.rs⁩ - ⁨623⁩ bytes
Raw
1 use giterated_models::{repository::Repository, user::User};
2
3 use crate::operations::CommentVisibility;
4
5 /// An [`Issue`]'s database representation.
6 #[derive(Debug, sqlx::FromRow)]
7 pub struct IssueRow {
8 pub id: i32,
9 #[sqlx(try_from = "String")]
10 pub repository: Repository,
11 #[sqlx(try_from = "String")]
12 pub author: User,
13 pub creation_date: i32,
14 pub issue_name: String,
15 pub contents: Option<String>,
16 }
17
18 #[derive(Debug, sqlx::FromRow)]
19 pub struct IssueCommentRow {
20 #[sqlx(try_from = "String")]
21 pub author: User,
22 pub contents: Option<String>,
23 pub visibility: CommentVisibility,
24 }
25