1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: buzz.bookhive.book
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8///A book in the user's library
9#[jacquard_derive::lexicon]
10#[derive(
11 serde::Serialize,
12 serde::Deserialize,
13 Debug,
14 Clone,
15 PartialEq,
16 Eq,
17 jacquard_derive::IntoStatic
18)]
19#[serde(rename_all = "camelCase")]
20pub struct Book<'a> {
21 ///The authors of the book (tab separated)
22 #[serde(borrow)]
23 pub authors: jacquard_common::CowStr<'a>,
24 ///Cover image of the book
25 #[serde(skip_serializing_if = "std::option::Option::is_none")]
26 #[serde(borrow)]
27 pub cover: std::option::Option<jacquard_common::types::blob::Blob<'a>>,
28 pub created_at: jacquard_common::types::string::Datetime,
29 ///The date the user finished reading the book
30 #[serde(skip_serializing_if = "std::option::Option::is_none")]
31 pub finished_at: std::option::Option<jacquard_common::types::string::Datetime>,
32 ///The book's hive id, used to correlate user's books with the hive
33 #[serde(borrow)]
34 pub hive_id: jacquard_common::CowStr<'a>,
35 ///The book's review
36 #[serde(skip_serializing_if = "std::option::Option::is_none")]
37 #[serde(borrow)]
38 pub review: std::option::Option<jacquard_common::CowStr<'a>>,
39 ///Number of stars given to the book (1-10) which will be mapped to 1-5 stars
40 #[serde(skip_serializing_if = "std::option::Option::is_none")]
41 pub stars: std::option::Option<i64>,
42 ///The date the user started reading the book
43 #[serde(skip_serializing_if = "std::option::Option::is_none")]
44 pub started_at: std::option::Option<jacquard_common::types::string::Datetime>,
45 #[serde(skip_serializing_if = "std::option::Option::is_none")]
46 #[serde(borrow)]
47 pub status: std::option::Option<jacquard_common::CowStr<'a>>,
48 ///The title of the book
49 #[serde(borrow)]
50 pub title: jacquard_common::CowStr<'a>,
51}
52
53impl jacquard_common::types::collection::Collection for Book<'_> {
54 const NSID: &'static str = "buzz.bookhive.book";
55}