interaction system

This commit is contained in:
2026-01-13 12:55:25 +08:00
parent efb2a2e4d1
commit 354e362ac3
15 changed files with 381 additions and 12 deletions

View File

@@ -0,0 +1,32 @@
use serde::{Deserialize, Serialize};
use ts_rs::TS;
#[derive(Clone, Serialize, Deserialize, Debug, TS)]
#[ts(export)]
#[serde(rename_all = "camelCase")]
pub struct SendInteractionDto {
pub recipient_user_id: String,
pub content: String,
#[serde(rename = "type")]
pub type_: String,
}
#[derive(Clone, Serialize, Deserialize, Debug, TS)]
#[ts(export)]
#[serde(rename_all = "camelCase")]
pub struct InteractionPayloadDto {
pub sender_user_id: String,
pub sender_name: String,
pub content: String,
#[serde(rename = "type")]
pub type_: String,
pub timestamp: String,
}
#[derive(Clone, Serialize, Deserialize, Debug, TS)]
#[ts(export)]
#[serde(rename_all = "camelCase")]
pub struct InteractionDeliveryFailedDto {
pub recipient_user_id: String,
pub reason: String,
}

View File

@@ -1 +1,4 @@
pub mod app_data;
pub mod interaction;
pub use interaction::*;