514f2222e0
* convert naive time to utc time * compounding fixes * cargo fmt * fix the rest * fix down migration * fix migrations * fix after merge * clippy fix * ap-fed 0.5.0 --------- Co-authored-by: Nutomic <me@nutomic.com>
29 lines
684 B
Rust
29 lines
684 B
Rust
use crate::{newtypes::DbUrl, schema::sent_activity};
|
|
use chrono::{DateTime, Utc};
|
|
use serde_json::Value;
|
|
use std::fmt::Debug;
|
|
|
|
#[derive(PartialEq, Eq, Debug, Queryable)]
|
|
#[diesel(table_name = sent_activity)]
|
|
pub struct SentActivity {
|
|
pub id: i64,
|
|
pub ap_id: DbUrl,
|
|
pub data: Value,
|
|
pub sensitive: bool,
|
|
pub published: DateTime<Utc>,
|
|
}
|
|
#[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: DateTime<Utc>,
|
|
}
|