This commit is contained in:
2024-12-26 01:28:32 +01:00
parent 3e8500e825
commit c58e10bfa0
29 changed files with 1622 additions and 865 deletions

View File

@@ -5,6 +5,7 @@ use super::date::naive_date_serializer;
use super::sequence::Sequence;
#[derive(sqlx::FromRow, sqlx::Type, Serialize)]
#[sqlx(type_name = "author_type")]
pub struct Author {
pub id: i32,
pub first_name: String,
@@ -23,7 +24,7 @@ pub struct AuthorBook {
pub available_types: Vec<String>,
#[serde(serialize_with = "naive_date_serializer::serialize")]
pub uploaded: NaiveDate,
pub translators: sqlx::types::Json<Vec<Author>>,
pub sequences: sqlx::types::Json<Vec<Sequence>>,
pub translators: Vec<Author>,
pub sequences: Vec<Sequence>,
pub annotation_exists: bool,
}