stat_summoner/models/
data.rs

1use mongodb::Client;
2use serde::{Deserialize, Serialize};
3use serde_json::Value;
4use std::sync::Arc;
5use tokio::sync::RwLock;
6pub struct Data {
7    pub riot_api_key: String,
8    pub mongo_client: Client,
9    pub dd_json: Arc<RwLock<Value>>,
10    pub suggestions_channel_id: u64,
11}
12
13#[derive(Debug, Serialize, Deserialize)]
14pub struct SummonerFollowedData {
15    pub puuid: String,
16    pub name: String,
17    pub tag: String,
18    pub region: String,
19    pub last_match_id: String,
20    pub time_end_follow: String,
21    pub channel_id: u64,
22    pub guild_id: String,
23}
24
25#[derive(Debug, Serialize, Deserialize)]
26pub struct EmojiId {
27    pub role: String,
28    pub name: String,
29    pub id_emoji: String,
30}
31
32#[derive(Debug, Serialize, Deserialize, Clone)]
33pub struct ChampionData {
34    pub name: String,
35    pub id_name: String,
36    pub role: Vec<String>,
37    pub popularity: String,
38    pub winrate: String,
39    pub banrate: String,
40    pub runes: RunesData,
41    pub core_build: CoreBuildData,
42}
43
44#[derive(Debug, Serialize, Deserialize, Clone)]
45pub struct RunesData {
46    pub parent_primary_rune: String,
47    pub child_primary_rune_1: String,
48    pub child_primary_rune_2: String,
49    pub child_primary_rune_3: String,
50    pub child_secondary_rune_1: String,
51    pub child_secondary_rune_2: String,
52    pub tertiary_rune_1: String,
53    pub tertiary_rune_2: String,
54    pub tertiary_rune_3: String,
55}
56
57#[derive(Debug, Serialize, Deserialize, Clone)]
58pub struct CoreBuildData {
59    pub first: String,
60    pub second: String,
61    pub third: String,
62}
63
64#[derive(Debug, Serialize, Deserialize)]
65pub struct User {
66    pub user_id: String,
67    pub username: String,
68    pub last_command_at: u64,
69    pub count_command: u64,
70    pub last_suggestion_at: u64,
71    pub is_blacklisted: bool,
72    pub created_at: u64,
73}