Skip to main content

wekan_cli/command_result/
comments.rs

1use serde::Serialize;
2
3#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
4pub struct CommentSummary {
5    pub comment_id: String,
6    pub text: String,
7    pub author_id: String,
8}
9
10#[derive(Debug, Eq, PartialEq, Serialize)]
11pub struct CommentCollectionSuccess {
12    pub board_id: String,
13    pub card_id: String,
14    pub comments: Vec<CommentSummary>,
15}
16
17#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
18pub struct CommentDetail {
19    pub comment_id: String,
20    pub board_id: String,
21    pub card_id: String,
22    pub text: String,
23    pub parent_id: Option<String>,
24    pub created_at: String,
25    pub modified_at: String,
26    pub author_id: String,
27}
28
29#[derive(Debug, Eq, PartialEq, Serialize)]
30pub struct CommentCreateSuccess {
31    pub board_id: String,
32    pub card_id: String,
33    pub comment_id: String,
34}
35
36#[derive(Clone, Copy, Debug, Eq, PartialEq, Serialize)]
37#[serde(rename_all = "snake_case")]
38pub enum CommentDeleteMode {
39    Hard,
40}
41
42#[derive(Debug, Eq, PartialEq, Serialize)]
43pub struct CommentDeleteSuccess {
44    pub board_id: String,
45    pub card_id: String,
46    pub comment_id: String,
47    pub deleted: bool,
48    pub delete_mode: CommentDeleteMode,
49}