Add pub to struct fields

This commit is contained in:
Leon Grünewald 2024-01-01 21:50:57 +01:00
parent 70bdfede77
commit ec2b8f7b0d

View file

@ -17,48 +17,48 @@ impl Into<Vec<Post>> for Posts {
#[derive(serde::Deserialize, Clone, Debug)]
pub struct Post {
id: Id,
created_at: String,
updated_at: String,
tags: PostTags,
file: PostFile,
rating: String,
fav_count: u16,
sources: Vec<String>,
approver_id: Option<Id>,
uploader_id: Id,
description: String,
comment_count: u16,
has_notes: bool,
is_favorited: bool,
change_seq: Option<u128>,
relationships: PostRelationships
pub id: Id,
pub created_at: String,
pub updated_at: String,
pub tags: PostTags,
pub file: PostFile,
pub rating: String,
pub fav_count: u16,
pub sources: Vec<String>,
pub approver_id: Option<Id>,
pub uploader_id: Id,
pub description: String,
pub comment_count: u16,
pub has_notes: bool,
pub is_favorited: bool,
pub change_seq: Option<u128>,
pub relationships: PostRelationships
}
#[derive(serde::Deserialize, Clone, Debug)]
pub struct PostTags {
general: Vec<String>,
artist: Vec<String>,
copyright: Vec<String>,
character: Vec<String>,
invalid: Vec<String>,
meta: Vec<String>,
lore: Vec<String>
pub general: Vec<String>,
pub artist: Vec<String>,
pub copyright: Vec<String>,
pub character: Vec<String>,
pub invalid: Vec<String>,
pub meta: Vec<String>,
pub lore: Vec<String>
}
#[derive(serde::Deserialize, Clone, Debug)]
pub struct PostFile {
width: ImageDimension,
height: ImageDimension,
ext: String,
size: FileSize,
md5: String,
url: String
pub width: ImageDimension,
pub height: ImageDimension,
pub ext: String,
pub size: FileSize,
pub md5: String,
pub url: String
}
#[derive(serde::Deserialize, Clone, Debug)]
pub struct PostRelationships {
parent_id: Option<Id>,
has_children: bool,
has_active_children: bool,
pub parent_id: Option<Id>,
pub has_children: bool,
pub has_active_children: bool,
}