feat(sbc): make submissions atomic and durable
CI / Build, lint & test (push) Failing after 52s

This commit is contained in:
funman300
2026-08-18 18:26:23 +00:00
parent 637a21eac1
commit 271c3639ed
7 changed files with 1264 additions and 85 deletions
+14 -2
View File
@@ -33,16 +33,17 @@ pub struct SbcReward {
pub pack_id: Option<String>,
}
/// DB record of a completed submission
#[allow(dead_code)]
/// DB record of a completed submission.
#[derive(Debug, Clone, Serialize, Deserialize, sqlx::FromRow)]
pub struct SbcSubmission {
pub id: String,
pub profile_id: String,
pub club_id: Option<String>,
pub sbc_id: String,
pub submitted_card_ids: String,
pub passed: bool,
pub submitted_at: String,
pub repeatable: bool,
}
#[derive(Debug, Deserialize)]
@@ -51,6 +52,17 @@ pub struct SubmitSbcRequest {
pub owned_card_ids: Vec<String>,
}
#[derive(Debug, Deserialize)]
pub struct SaveSbcSquadRequest {
pub owned_card_ids: Vec<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SbcSquadState {
pub sbc_id: String,
pub owned_card_ids: Vec<String>,
}
#[derive(Debug, Serialize)]
pub struct SbcResult {
pub passed: bool,