wellbeinglib/dto/
behaviour_request.rs

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

use crate::enums::behaviour_type::BehavioutType;
use crate::jsonb::behaviour_details::BehaviourDetails;

#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct BehaviourRequest {
    pub id: Option<Uuid>,
    pub user_ids: Vec<Uuid>,
    pub details: Option<BehaviourDetails>,
    pub behaviour_type: BehavioutType,
    pub reporter: Uuid,
    #[serde(with = "ts_milliseconds")]
    pub occurrence: NaiveDateTime,
    pub targets: Option<Vec<Uuid>>,
    pub organization: Option<Uuid>,
}