wekan_cli/command_result/
comments.rs1use 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 pub sync_comment_id: Option<String>,
28}
29
30#[derive(Debug, Eq, PartialEq, Serialize)]
31pub struct CommentCreateSuccess {
32 pub board_id: String,
33 pub card_id: String,
34 pub comment_id: String,
35}
36
37#[derive(Clone, Copy, Debug, Eq, PartialEq, Serialize)]
38#[serde(rename_all = "snake_case")]
39pub enum CommentDeleteMode {
40 Hard,
41}
42
43#[derive(Debug, Eq, PartialEq, Serialize)]
44pub struct CommentDeleteSuccess {
45 pub board_id: String,
46 pub card_id: String,
47 pub comment_id: String,
48 pub deleted: bool,
49 pub delete_mode: CommentDeleteMode,
50}