diff options
Diffstat (limited to 'adenosine-pds/src/models.rs')
-rw-r--r-- | adenosine-pds/src/models.rs | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/adenosine-pds/src/models.rs b/adenosine-pds/src/models.rs index 116ac53..0f47c2d 100644 --- a/adenosine-pds/src/models.rs +++ b/adenosine-pds/src/models.rs @@ -59,7 +59,8 @@ pub struct RepoBatchWrite { #[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)] pub struct Subject { pub uri: String, - pub cid: String, + // TODO: CID is required + pub cid: Option<String>, } /// Generic over Re-post and Like @@ -122,7 +123,8 @@ pub struct User { #[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)] pub struct FeedItem { pub uri: String, - pub cid: String, + // TODO: cid is required + pub cid: Option<String>, pub author: User, pub repostedBy: Option<User>, pub record: Value, @@ -139,11 +141,19 @@ pub struct FeedItem { #[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)] pub struct Post { pub text: String, + pub reply: Option<PostReply>, pub createdAt: Option<String>, } #[allow(non_snake_case)] #[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)] +pub struct PostReply { + pub parent: Subject, + pub root: Subject, +} + +#[allow(non_snake_case)] +#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)] pub struct PostThread { pub thread: ThreadItem, } @@ -152,7 +162,8 @@ pub struct PostThread { #[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)] pub struct ThreadItem { pub uri: String, - pub cid: String, + // TODO: CID is required + pub cid: Option<String>, pub author: User, pub record: Value, //pub embed?: RecordEmbed | ExternalEmbed | UnknownEmbed, |