35 lines
644 B
Rust
35 lines
644 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
/*#[derive(Deserialize)]
|
|
pub struct Admin<T> {
|
|
pub admin_psw: String,
|
|
#[serde(flatten)]
|
|
pub query: T,
|
|
}*/
|
|
|
|
#[derive(Deserialize, Serialize)]
|
|
pub struct CommentsByTopic {
|
|
pub mutation_token: Option<String>,
|
|
pub topic: String,
|
|
}
|
|
|
|
#[derive(Deserialize, Serialize)]
|
|
pub struct CommentsByTopicAdmin {
|
|
pub admin_psw: String,
|
|
pub topic: String,
|
|
}
|
|
|
|
#[derive(Deserialize, Serialize)]
|
|
pub struct NewComment {
|
|
pub author: String,
|
|
pub email: String,
|
|
pub text: String,
|
|
pub topic: String,
|
|
}
|
|
|
|
#[derive(Deserialize, Serialize)]
|
|
pub struct RemoveCommentAdmin {
|
|
pub admin_psw: String,
|
|
pub comment_id: String,
|
|
}
|