@@ -83,6 +83,40 @@ pub struct FeesWithdrawnData {
8383 pub to : String ,
8484}
8585
86+ // =============================================================================
87+ // Trade Detail View (Issue #31)
88+ // =============================================================================
89+
90+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
91+ pub struct TradeTimelineEntry {
92+ pub status : String ,
93+ pub ledger : i64 ,
94+ pub timestamp : Option < DateTime < Utc > > ,
95+ pub transaction_hash : Option < String > ,
96+ }
97+
98+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
99+ pub struct TradeDetailResponse {
100+ pub trade_id : i64 ,
101+ pub seller : String ,
102+ pub buyer : String ,
103+ pub amount : i64 ,
104+ pub fee : Option < i64 > ,
105+ pub seller_payout : Option < i64 > ,
106+ pub arbitrator : Option < String > ,
107+ pub status : String ,
108+ pub created_at : DateTime < Utc > ,
109+ pub updated_at : Option < DateTime < Utc > > ,
110+ pub timeline : Vec < TradeTimelineEntry > ,
111+ pub transaction_history : Vec < Event > ,
112+ pub metadata : Option < serde_json:: Value > ,
113+ }
114+
115+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
116+ pub struct TradeDetailQuery {
117+ pub viewer : Option < String > ,
118+ }
119+
86120#[ derive( Debug , Clone , Serialize , Deserialize ) ]
87121pub struct EventQuery {
88122 pub limit : Option < i64 > ,
0 commit comments