use time::{OffsetDateTime, PrimitiveDateTime}; use uuid::Uuid; use crate::{artist::Artist, comment::Comment, file::File}; #[derive(sqlx::FromRow)] pub struct Artwork { /// artwork id id: Option, /// name of the artwork pub title: Option, /// description of the artwork pub description: Option, /// source url of the artwork pub url_source: Option, /// artwork creation time created_at: Option, /// id of the artist #[sqlx(Flatten)] pub artist: Artist, /// ids of files #[sqlx(Flatten)] pub files: Vec, // /// TODO: comments in thread, // #[sqlx(Flatten)] // comments: Vec, }