1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Serialize, Deserialize)]
4#[serde(rename_all = "camelCase")]
5pub struct AdminOperateRequest<'a> {
6 #[serde(rename = "appId")]
7 pub app_id: &'a str,
8 #[serde(rename = "chatroomId")]
9 pub chatroom_id: &'a str,
10 #[serde(rename = "wxid")]
11 pub wxid: &'a str,
12 #[serde(rename = "isAdmin")]
13 pub is_admin: bool,
14}
15
16pub type SimpleGroupResponse = ();
17
18#[cfg(test)]
19mod tests {
20 use super::*;
21
22 #[test]
23 fn test_admin_operate_request_serialization() {
24 let req = AdminOperateRequest {
25 app_id: "test_app",
26 chatroom_id: "room123",
27 wxid: "wxid_test",
28 is_admin: true,
29 };
30 let json = serde_json::to_string(&req).unwrap();
31 assert!(json.contains("test_app"));
32 assert!(json.contains("room123"));
33 assert!(json.contains("wxid_test"));
34 assert!(json.contains("true"));
35 }
36}