use serde::{Deserialize, Serialize};
use steel::*;
use crate::state::VoteChoice;

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ProposalCreatedEvent {
    pub proposal_id: u64,
    pub creator: Pubkey,
    pub tier: u8,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VoteCastEvent {
    pub proposal_id: u64,
    pub voter: Pubkey,
    pub voting_power: u64,
    pub choice: VoteChoice,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ProposalExecutedEvent {
    pub proposal_id: u64,
    pub executor: Pubkey,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ProposalCancelledEvent {
    pub proposal_id: u64,
    pub canceller: Pubkey,
}
