projectlib/jsonb/
log.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use crate::enums::action_type::ActionType;
use chrono::naive::serde::ts_milliseconds;
use chrono::NaiveDateTime;
use serde::{Deserialize, Serialize};
use uuid::Uuid;

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct Log {
    pub user: Uuid,
    #[serde(with = "ts_milliseconds")]
    pub date: NaiveDateTime,
    pub action: ActionType,
    pub details: Option<serde_json::Value>,
    pub id: Option<Uuid>,
    pub new_id: Option<Uuid>,
    pub text: Option<String>,
    pub new_text: Option<String>,
    pub trackers : Option<Vec<Uuid>>,
    pub new_trackers : Option<Vec<Uuid>>,
}