framework_cqrs_lib/cqrs/models/views/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use std::collections::HashMap;

use serde::{Deserialize, Serialize};
use utoipa::ToSchema;

pub mod command_handler_view;
pub mod entities;

#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)]
pub struct DataWrapperView<T>
where
    T: Serialize + Clone,
{
    pub data: T,
}

#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct LinkView {
    #[serde(flatten)]
    pub links: HashMap<String, String>,
}