//! This code was AUTOGENERATED using the Codama library.
use {carbon_core::graphql::primitives::U64, juniper::GraphQLObject};

#[derive(Debug, Clone, GraphQLObject)]
#[graphql(name = "Fees")]
pub struct FeesGraphQL {
    pub trade_fee_numerator: U64,
    pub trade_fee_denominator: U64,
    pub owner_trade_fee_numerator: U64,
    pub owner_trade_fee_denominator: U64,
    pub owner_withdraw_fee_numerator: U64,
    pub owner_withdraw_fee_denominator: U64,
    pub host_fee_numerator: U64,
    pub host_fee_denominator: U64,
}

impl From<crate::types::Fees> for FeesGraphQL {
    fn from(original: crate::types::Fees) -> Self {
        Self {
            trade_fee_numerator: carbon_core::graphql::primitives::U64(
                original.trade_fee_numerator,
            ),
            trade_fee_denominator: carbon_core::graphql::primitives::U64(
                original.trade_fee_denominator,
            ),
            owner_trade_fee_numerator: carbon_core::graphql::primitives::U64(
                original.owner_trade_fee_numerator,
            ),
            owner_trade_fee_denominator: carbon_core::graphql::primitives::U64(
                original.owner_trade_fee_denominator,
            ),
            owner_withdraw_fee_numerator: carbon_core::graphql::primitives::U64(
                original.owner_withdraw_fee_numerator,
            ),
            owner_withdraw_fee_denominator: carbon_core::graphql::primitives::U64(
                original.owner_withdraw_fee_denominator,
            ),
            host_fee_numerator: carbon_core::graphql::primitives::U64(original.host_fee_numerator),
            host_fee_denominator: carbon_core::graphql::primitives::U64(
                original.host_fee_denominator,
            ),
        }
    }
}
