44 lines
911 B
Rust
44 lines
911 B
Rust
use std::num::NonZeroU8;
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
use super::platform::Platform;
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct Download {
|
|
pub file_name: String,
|
|
pub platform: Platform,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Serialize)]
|
|
pub struct StoredNovel {
|
|
#[serde(flatten)]
|
|
pub novel: Novel,
|
|
|
|
pub modified_at: jiff::Zoned,
|
|
pub created_at: jiff::Zoned,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct FullNovel {
|
|
pub data: Novel,
|
|
|
|
pub upload_queue: Vec<String>,
|
|
pub files: Vec<String>,
|
|
pub screenshots: Vec<String>,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct Novel {
|
|
pub title: String,
|
|
pub description: String,
|
|
|
|
pub vndb: Option<url::Url>,
|
|
pub hours_to_read: Option<NonZeroU8>,
|
|
|
|
pub tags: Vec<String>,
|
|
pub genres: Vec<String>,
|
|
|
|
pub tg_post: Option<url::Url>,
|
|
pub post_at: jiff::Zoned,
|
|
}
|