mirror of
https://github.com/versia-pub/activitypub.git
synced 2026-03-13 10:59:17 +01:00
Add a post fuct
This commit is contained in:
parent
4c020229e4
commit
8ac9f7bd4b
4 changed files with 80 additions and 25 deletions
|
|
@ -31,15 +31,15 @@ pub struct DbPost {
|
|||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Note {
|
||||
#[serde(rename = "type")]
|
||||
kind: NoteType,
|
||||
id: ObjectId<post::Model>,
|
||||
pub(crate) kind: NoteType,
|
||||
pub(crate) id: ObjectId<post::Model>,
|
||||
pub(crate) attributed_to: ObjectId<user::Model>,
|
||||
#[serde(deserialize_with = "deserialize_one_or_many")]
|
||||
pub(crate) to: Vec<Url>,
|
||||
content: String,
|
||||
in_reply_to: Option<ObjectId<post::Model>>,
|
||||
tag: Vec<Mention>,
|
||||
sensitive: bool,
|
||||
pub(crate) content: String,
|
||||
pub(crate) in_reply_to: Option<ObjectId<post::Model>>,
|
||||
pub(crate) tag: Vec<Mention>,
|
||||
pub(crate) sensitive: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue