2023-07-14 15:17:06 +00:00
|
|
|
use crate::{newtypes::DbUrl, schema::sent_activity};
|
2020-12-21 13:38:34 +00:00
|
|
|
use serde_json::Value;
|
|
|
|
use std::fmt::Debug;
|
|
|
|
|
2023-07-14 15:17:06 +00:00
|
|
|
#[derive(PartialEq, Eq, Debug, Queryable)]
|
|
|
|
#[diesel(table_name = sent_activity)]
|
|
|
|
pub struct SentActivity {
|
|
|
|
pub id: i64,
|
2021-11-22 18:57:03 +00:00
|
|
|
pub ap_id: DbUrl,
|
2023-07-14 15:17:06 +00:00
|
|
|
pub data: Value,
|
2023-04-17 19:19:51 +00:00
|
|
|
pub sensitive: bool,
|
2023-07-14 15:17:06 +00:00
|
|
|
pub published: chrono::NaiveDateTime,
|
2020-12-21 13:38:34 +00:00
|
|
|
}
|
2022-10-27 09:24:07 +00:00
|
|
|
#[derive(Insertable)]
|
2023-07-14 15:17:06 +00:00
|
|
|
#[diesel(table_name = sent_activity)]
|
|
|
|
pub struct SentActivityForm {
|
2021-03-02 12:41:48 +00:00
|
|
|
pub ap_id: DbUrl,
|
2023-07-14 15:17:06 +00:00
|
|
|
pub data: Value,
|
|
|
|
pub sensitive: bool,
|
2022-10-27 09:24:07 +00:00
|
|
|
}
|
|
|
|
|
2023-07-14 15:17:06 +00:00
|
|
|
#[derive(PartialEq, Eq, Debug, Queryable)]
|
|
|
|
#[diesel(table_name = received_activity)]
|
|
|
|
pub struct ReceivedActivity {
|
|
|
|
pub id: i64,
|
|
|
|
pub ap_id: DbUrl,
|
|
|
|
pub published: chrono::NaiveDateTime,
|
2020-12-21 13:38:34 +00:00
|
|
|
}
|