hypercall_db/types/
settlements.rs1use chrono::{DateTime, Utc};
7use hypercall_types::WalletAddress;
8use rust_decimal::Decimal;
9use serde::{Deserialize, Serialize};
10
11#[derive(Debug, Clone, Copy, PartialEq, Eq)]
13pub struct SettlementResult {
14 pub newly_persisted: bool,
16}
17
18#[derive(Debug, Clone, Serialize, Deserialize)]
20pub struct SettlementPayoutRecord {
21 pub id: i64,
22 pub wallet: WalletAddress,
23 pub symbol: String,
24 pub expiry_ts: i64,
26 pub position_size: Decimal,
27 pub settlement_price: Decimal,
28 pub payout_amount: Decimal,
29 pub ledger_applied: bool,
31 pub created_at: Option<DateTime<Utc>>,
32 pub settlement_entry_price: Option<Decimal>,
33 pub cost_basis: Option<Decimal>,
34 pub net_pnl: Option<Decimal>,
35}