2021-10-16 13:33:38 +00:00
|
|
|
use crate::{newtypes::DbUrl, schema::activity};
|
2020-12-21 13:38:34 +00:00
|
|
|
use serde_json::Value;
|
|
|
|
use std::fmt::Debug;
|
|
|
|
|
2022-05-03 17:44:13 +00:00
|
|
|
#[derive(PartialEq, Debug, Queryable, Identifiable)]
|
2020-12-21 13:38:34 +00:00
|
|
|
#[table_name = "activity"]
|
|
|
|
pub struct Activity {
|
|
|
|
pub id: i32,
|
|
|
|
pub data: Value,
|
|
|
|
pub local: bool,
|
|
|
|
pub published: chrono::NaiveDateTime,
|
|
|
|
pub updated: Option<chrono::NaiveDateTime>,
|
2021-11-22 18:57:03 +00:00
|
|
|
pub ap_id: DbUrl,
|
2020-12-21 13:38:34 +00:00
|
|
|
pub sensitive: Option<bool>,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Insertable, AsChangeset)]
|
|
|
|
#[table_name = "activity"]
|
|
|
|
pub struct ActivityForm {
|
|
|
|
pub data: Value,
|
2021-03-20 20:59:07 +00:00
|
|
|
pub local: Option<bool>,
|
2020-12-21 13:38:34 +00:00
|
|
|
pub updated: Option<chrono::NaiveDateTime>,
|
2021-03-02 12:41:48 +00:00
|
|
|
pub ap_id: DbUrl,
|
2020-12-21 13:38:34 +00:00
|
|
|
pub sensitive: bool,
|
|
|
|
}
|