competitionlib/dto/
registration_team_response.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use serde::{Deserialize, Serialize};

use crate::dto::participant_response::ParticipantResponse;
use crate::dto::game_participant_response::GameParticipantResponse;
use crate::dto::competition_participant_response::CompetitionParticipantResponse;
use crate::dto::division_participant_response::DivisionParticipantResponse;

#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct RegistrationTeamResponse {
    pub participant: ParticipantResponse,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub game_participant: Option<GameParticipantResponse>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub competition_participant: Option<CompetitionParticipantResponse>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub division_participant: Option<DivisionParticipantResponse>,
}