X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fdb_schema%2Fsrc%2Fsource%2Factivity.rs;h=85b193f51f525fcbab2df076eca8be2c87f225cc;hb=e9e76549a88cfbdab36f00d302cceabcaaa24f4c;hp=c5ac833ed2aa109cb9a93d8091df998e1731b1f4;hpb=f24999027e26fc77cc3808674f4f37fb1883c20f;p=lemmy.git diff --git a/crates/db_schema/src/source/activity.rs b/crates/db_schema/src/source/activity.rs index c5ac833e..85b193f5 100644 --- a/crates/db_schema/src/source/activity.rs +++ b/crates/db_schema/src/source/activity.rs @@ -1,25 +1,28 @@ -use crate::{newtypes::DbUrl, schema::activity}; +use crate::{newtypes::DbUrl, schema::sent_activity}; use serde_json::Value; use std::fmt::Debug; -#[derive(Queryable, Identifiable, PartialEq, Debug)] -#[table_name = "activity"] -pub struct Activity { - pub id: i32, +#[derive(PartialEq, Eq, Debug, Queryable)] +#[diesel(table_name = sent_activity)] +pub struct SentActivity { + pub id: i64, + pub ap_id: DbUrl, pub data: Value, - pub local: bool, + pub sensitive: bool, pub published: chrono::NaiveDateTime, - pub updated: Option, - pub ap_id: Option, - pub sensitive: Option, } - -#[derive(Insertable, AsChangeset)] -#[table_name = "activity"] -pub struct ActivityForm { - pub data: Value, - pub local: Option, - pub updated: Option, +#[derive(Insertable)] +#[diesel(table_name = sent_activity)] +pub struct SentActivityForm { pub ap_id: DbUrl, + pub data: Value, pub sensitive: bool, } + +#[derive(PartialEq, Eq, Debug, Queryable)] +#[diesel(table_name = received_activity)] +pub struct ReceivedActivity { + pub id: i64, + pub ap_id: DbUrl, + pub published: chrono::NaiveDateTime, +}