170 lines
4.3 KiB
Rust
170 lines
4.3 KiB
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct Betting {
|
|
/// KGON 거래 고유 코드
|
|
pub _id: String,
|
|
/// 게임사 코드
|
|
#[serde(rename = "vendorId")]
|
|
pub vendor_id: i64,
|
|
/// 게임사
|
|
#[serde(rename = "vendorName")]
|
|
pub vendor_name: String,
|
|
/// 게임코드
|
|
#[serde(rename = "gameId")]
|
|
pub game_id: i64,
|
|
/// 게임명
|
|
#[serde(rename = "gameName")]
|
|
pub game_name: String,
|
|
/// 게임종류
|
|
#[serde(rename = "gameCategory")]
|
|
pub game_category: String,
|
|
/// 게임형식
|
|
#[serde(rename = "gameType")]
|
|
pub game_type: String,
|
|
/// 환율
|
|
pub currency: String,
|
|
/// 거래금액
|
|
pub cash: f64,
|
|
/// 이전보유금액
|
|
#[serde(rename = "beforeCash")]
|
|
pub before_cash: f64,
|
|
/// 이후보유금액
|
|
#[serde(rename = "afterCash")]
|
|
pub after_cash: f64,
|
|
/// 사이트 매장 코드
|
|
#[serde(rename = "groupKey")]
|
|
pub group_key: Option<String>,
|
|
/// 게임 데이터
|
|
#[serde(with = "serde_bytes")]
|
|
pub detail: Option<Vec<u8>>,
|
|
/// 보너스 여부
|
|
#[serde(rename = "isBonus")]
|
|
pub is_bonus: bool,
|
|
/// 프로모션 여부
|
|
#[serde(rename = "isPromo")]
|
|
pub is_promo: bool,
|
|
/// 잭팟 여부
|
|
#[serde(rename = "isJackpot")]
|
|
pub is_jackpot: bool,
|
|
/// 사이트 회원 아이디
|
|
#[serde(rename = "siteUsername")]
|
|
pub site_username: String,
|
|
/// 게임사 고유코드
|
|
pub key: String,
|
|
/// 게임사 상위 배팅 코드
|
|
#[serde(rename = "refId")]
|
|
pub ref_id: String,
|
|
#[serde(rename = "oRefId")]
|
|
pub o_ref_id: Option<String>,
|
|
/// 결과로서 turn_bet, turn_win, turn_draw, turn_cancel이 존재
|
|
#[serde(rename = "type")]
|
|
pub betting_type: String,
|
|
/// 카테고리
|
|
pub category: String,
|
|
/// 일자 - 파트너의 timezone 반영
|
|
#[serde(rename = "createdAt")]
|
|
pub created_at: String,
|
|
/// UTC TIME 으로서 한국시간에서 9시간이 빠진 시간입니다. 다음 검색시 sdate에 입력하세요
|
|
#[serde(rename = "utcCreatedAt")]
|
|
pub utc_created_at: String,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct ListBettingsRequest {
|
|
pub vendor_key: Option<String>,
|
|
pub sdate: Option<String>,
|
|
pub edate: Option<String>,
|
|
pub group_key: Option<String>,
|
|
pub username: Option<String>,
|
|
pub limit: i64,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct _ListBettingsResponse {
|
|
pub code: i64,
|
|
pub msg: Option<String>,
|
|
pub transactions: Option<Vec<Betting>>,
|
|
#[serde(rename = "lastObjectId")]
|
|
pub last_object_id: Option<String>,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct ListBettingsResponse {
|
|
pub transactions: Vec<Betting>,
|
|
pub last_object_id: Option<String>,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct GetPragmaticBettingRequest {
|
|
pub id: String,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct _GetPragmaticBettingResponse {
|
|
pub code: i64,
|
|
pub msg: Option<String>,
|
|
pub url: Option<String>,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct GetPragmaticBettingResponse {
|
|
pub url: String,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct EvolutionBettingDetail {
|
|
pub id: String,
|
|
pub detail: String,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct GetEvolutionBettingDetailRequest {
|
|
pub ids: String,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct _GetEvolutionBettingDetailResponse {
|
|
pub code: i64,
|
|
pub msg: Option<String>,
|
|
pub transactions: Option<Vec<EvolutionBettingDetail>>,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct GetEvolutionBettingDetailResponse {
|
|
pub transactions: Vec<EvolutionBettingDetail>,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct Statistic {
|
|
#[serde(rename = "betAmount")]
|
|
pub bet_amount: f64,
|
|
#[serde(rename = "drawAmount")]
|
|
pub draw_amount: f64,
|
|
#[serde(rename = "cancelAmount")]
|
|
pub cancel_amount: f64,
|
|
#[serde(rename = "winAmount")]
|
|
pub win_amount: f64,
|
|
#[serde(rename = "revenueAmount")]
|
|
pub revenue_amount: f64,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct GetStatisticRequest {
|
|
pub vendor_key: Option<String>,
|
|
pub group_key: Option<String>,
|
|
pub date: Option<String>,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct _GetStatisticResponse {
|
|
pub code: i64,
|
|
pub msg: Option<String>,
|
|
pub data: Option<Statistic>,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct GetStatisticResponse {
|
|
pub data: Option<Statistic>,
|
|
}
|