use crate::DecisionEntryType;
use crate::types::orders::recommendation::DecisionType;
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct TriggeredDecision {
    pub decision: DecisionType,
    pub trigger: String,
    #[serde(rename = "type")]
    pub kind: DecisionEntryType,
}

impl TriggeredDecision {
    pub fn new(decision: DecisionType, trigger: String, kind: DecisionEntryType) -> Self {
        Self {
            decision,
            trigger,
            kind,
        }
    }
}
