Skip to main content

max / makenotwork

567 B · 22 lines History Blame Raw
1 //! Split export row model.
2
3 use chrono::{DateTime, Utc};
4 use sqlx::FromRow;
5
6 use super::super::id_types::*;
7 use super::super::validated_types::Cents;
8
9 /// A revenue split record with context for CSV export.
10 #[derive(Debug, Clone, FromRow)]
11 pub struct DbSplitExportRow {
12 pub id: RevenueSplitId,
13 pub recipient_id: UserId,
14 pub amount_cents: Cents,
15 pub split_percent: i16,
16 pub created_at: DateTime<Utc>,
17 /// "sale" or "tip"
18 pub source_type: String,
19 /// Username of the member who receives this split
20 pub recipient_username: String,
21 }
22