courselib/dto/
programm_request.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
use serde::{Deserialize, Serialize};
use uuid::Uuid;
use crate::enums::course_role::CourseRole;
use crate::jsonb::comment::Comment;

use crate::jsonb::module::Module;
use crate::jsonb::status_history::StatusHistory;

#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct ProgrammRequest {
    pub id: Option<Uuid>,
    pub ver: Option<i32>,
    pub title: String,
    pub description: String,
    pub picture: String,
    pub subjects: Option<Vec<String>>,
    pub organization: Uuid,
    pub status: String,
    pub available_below: Uuid,
    pub author: Uuid,
    pub parent: Option<Uuid>,
    pub status_history: Option<diesel_json::Json<Vec<StatusHistory>>>,
    pub template: Uuid,
    pub modules: Option<diesel_json::Json<Vec<Module>>>,
    pub years: Option<Vec<i32>>,
    pub comments: Option<Vec<Comment>>,
    pub co_authors: Option<Vec<Uuid>>,
    pub for_roles: Option<Vec<CourseRole>>,
}