1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
use crate::events::Source; use serde_derive::Deserialize; #[derive(Deserialize, Debug)] pub struct PostBackEvent { #[serde(rename = "replyToken")] pub reply_token: String, pub mode: String, pub timestamp: i64, pub source: Source, pub postback: PostBack, } #[derive(Deserialize, Debug)] pub struct PostBack { pub data: String, pub params: Option<Params>, } #[derive(Deserialize, Debug)] pub struct Params { pub date: Option<String>, pub time: Option<String>, pub datetime: Option<String>, }