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::author::Author;
use super::date::naive_date_serializer;
#[derive(sqlx::FromRow, sqlx::Type, Serialize)]
#[sqlx(type_name = "sequence_type")]
pub struct Sequence {
pub id: i32,
pub name: String,
@@ -20,8 +21,8 @@ pub struct SequenceBook {
pub available_types: Vec<String>,
#[serde(serialize_with = "naive_date_serializer::serialize")]
pub uploaded: NaiveDate,
pub authors: sqlx::types::Json<Vec<Author>>,
pub translators: sqlx::types::Json<Vec<Author>>,
pub authors: Vec<Author>,
pub translators: Vec<Author>,
pub annotation_exists: bool,
pub position: i32,
}