tosho_mplus/proto/
comments.rs

1//! A module containing information related to comments and feedback.
2//!
3//! If something is missing, please [open an issue](https://github.com/noaione/tosho-mango/issues/new/choose) or a [pull request](https://github.com/noaione/tosho-mango/compare).
4
5#![allow(clippy::derive_partial_eq_without_eq)]
6
7use tosho_macros::AutoGetter;
8
9/// A comment response
10#[derive(Clone, AutoGetter, PartialEq, ::prost::Message)]
11pub struct Comment {
12    /// The comment ID
13    #[prost(uint64, tag = "1")]
14    id: u64,
15    /// The comment index
16    #[prost(uint64, tag = "2")]
17    index: u64,
18    /// The commentor user name
19    #[prost(string, tag = "3")]
20    user_name: ::prost::alloc::string::String,
21    /// The commentor user avatar URL
22    #[prost(string, tag = "4")]
23    user_avatar: ::prost::alloc::string::String,
24    /// Is the commentor ourselves?
25    #[prost(bool, tag = "6")]
26    is_self: bool,
27    /// Is the comment liked by us?
28    #[prost(bool, tag = "7")]
29    liked: bool,
30    /// The number of likes
31    #[prost(uint64, tag = "9")]
32    likes: u64,
33    /// The comment content/body
34    #[prost(string, tag = "10")]
35    content: ::prost::alloc::string::String,
36    /// The UNIX timestamp of the comment creation
37    #[prost(int64, tag = "11")]
38    timestamp: i64,
39}
40
41/// A comment icon data
42#[derive(Clone, AutoGetter, PartialEq, ::prost::Message)]
43pub struct CommentIcon {
44    /// The comment icon ID
45    #[prost(uint64, tag = "1")]
46    id: u64,
47    /// The comment icon URL
48    #[prost(string, tag = "2")]
49    url: ::prost::alloc::string::String,
50}
51
52/// A comment list response
53#[derive(Clone, AutoGetter, PartialEq, ::prost::Message)]
54pub struct CommentList {
55    /// The list of comments
56    #[prost(message, repeated, tag = "1")]
57    comments: ::prost::alloc::vec::Vec<Comment>,
58    #[prost(bool, tag = "2")]
59    #[allow(clippy::missing_docs_in_private_items)]
60    set_user_name: bool,
61}