]> Untitled Git - lemmy.git/blob - crates/db_schema/src/source/activity.rs
Merge branch 'main' into move_matrix_and_admin_to_person
[lemmy.git] / crates / db_schema / src / source / activity.rs
1 use crate::{schema::activity, DbUrl};
2 use serde_json::Value;
3 use std::fmt::Debug;
4
5 #[derive(Queryable, Identifiable, PartialEq, Debug)]
6 #[table_name = "activity"]
7 pub struct Activity {
8   pub id: i32,
9   pub data: Value,
10   pub local: bool,
11   pub published: chrono::NaiveDateTime,
12   pub updated: Option<chrono::NaiveDateTime>,
13   pub ap_id: Option<DbUrl>,
14   pub sensitive: Option<bool>,
15 }
16
17 #[derive(Insertable, AsChangeset)]
18 #[table_name = "activity"]
19 pub struct ActivityForm {
20   pub data: Value,
21   pub local: Option<bool>,
22   pub updated: Option<chrono::NaiveDateTime>,
23   pub ap_id: DbUrl,
24   pub sensitive: bool,
25 }