Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added allocation expenditure #192

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions model/src/payment/allocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ pub struct DepositUpdate {
pub validate: Option<ValidateDepositCall>,
}

#[serde_as]
#[skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct AllocationExpenditure {
pub allocation_id: String,
pub agreement_id: String,
pub activity_id: Option<String>,
pub accepted_amount: BigDecimal,
pub scheduled_amount: BigDecimal,
}

#[serde_as]
#[skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
Expand All @@ -41,6 +53,8 @@ pub struct Allocation {
pub timestamp: DateTime<Utc>,
pub timeout: Option<DateTime<Utc>>,
pub deposit: Option<Deposit>,
pub created_ts: DateTime<Utc>,
pub updated_ts: DateTime<Utc>,
#[serde(default)]
pub make_deposit: bool,
#[serde_as(as = "Option<DurationSeconds<u64>>")]
Expand Down
Loading