Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src-tauri/crates/domain/src/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ use ts_rs::TS;
pub use crate::stats::{LolRole, Position};

#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "typescript", derive(TS))]
#[cfg_attr(feature = "typescript", ts(export))]
pub struct Player {
pub id: String,
pub match_name: String,
Expand Down
14 changes: 14 additions & 0 deletions src-tauri/crates/domain/src/social.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
use serde::{Deserialize, Serialize};
#[cfg(feature = "typescript")]
use ts_rs::TS;

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[cfg_attr(feature = "typescript", derive(TS))]
#[cfg_attr(feature = "typescript", ts(export))]
pub enum SocialAuthorType {
Team,
Player,
Expand All @@ -12,6 +16,8 @@ pub enum SocialAuthorType {
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[cfg_attr(feature = "typescript", derive(TS))]
#[cfg_attr(feature = "typescript", ts(export))]
pub enum SocialSentiment {
Hype,
Calm,
Expand All @@ -22,6 +28,8 @@ pub enum SocialSentiment {
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[cfg_attr(feature = "typescript", derive(TS))]
#[cfg_attr(feature = "typescript", ts(export))]
pub enum SocialPostCategory {
MatchResult,
Banter,
Expand All @@ -33,6 +41,8 @@ pub enum SocialPostCategory {
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[cfg_attr(feature = "typescript", derive(TS))]
#[cfg_attr(feature = "typescript", ts(export))]
pub struct SocialAccount {
pub id: String,
pub language: String,
Expand All @@ -45,6 +55,8 @@ pub struct SocialAccount {
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[cfg_attr(feature = "typescript", derive(TS))]
#[cfg_attr(feature = "typescript", ts(export))]
pub struct SocialTemplate {
pub id: String,
pub language: String,
Expand All @@ -58,6 +70,8 @@ pub struct SocialTemplate {
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[cfg_attr(feature = "typescript", derive(TS))]
#[cfg_attr(feature = "typescript", ts(export))]
pub struct SocialPost {
pub id: String,
pub date: String,
Expand Down
12 changes: 12 additions & 0 deletions src-tauri/crates/domain/src/team.rs
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,8 @@ pub struct ScrimSlotResult {
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[cfg_attr(feature = "typescript", derive(TS))]
#[cfg_attr(feature = "typescript", ts(export))]
pub enum ScrimStatus {
Pending,
Accepted,
Expand All @@ -585,6 +587,8 @@ pub enum ScrimStatus {
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[cfg_attr(feature = "typescript", derive(TS))]
#[cfg_attr(feature = "typescript", ts(export))]
pub enum ScrimFocus {
DraftPrep,
ChampionPool,
Expand All @@ -595,6 +599,8 @@ pub enum ScrimFocus {
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[cfg_attr(feature = "typescript", derive(TS))]
#[cfg_attr(feature = "typescript", ts(export))]
pub enum ScrimIssue {
DraftGap,
LanePressure,
Expand All @@ -605,6 +611,8 @@ pub enum ScrimIssue {
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[cfg_attr(feature = "typescript", derive(TS))]
#[cfg_attr(feature = "typescript", ts(export))]
pub enum PostScrimDecision {
ContinuePlan,
VodReview,
Expand All @@ -615,13 +623,17 @@ pub enum PostScrimDecision {
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[cfg_attr(feature = "typescript", derive(TS))]
#[cfg_attr(feature = "typescript", ts(export))]
pub struct ScrimChampionPick {
pub player_id: String,
pub champion_id: String,
pub role: String,
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[cfg_attr(feature = "typescript", derive(TS))]
#[cfg_attr(feature = "typescript", ts(export))]
pub struct ScrimReport {
pub date: String,
pub week_key: String,
Expand Down
2 changes: 2 additions & 0 deletions src-tauri/crates/ofm_core/src/game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ use ts_rs::TS;
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Default)]
#[cfg_attr(feature = "typescript", derive(TS))]
#[cfg_attr(feature = "typescript", ts(export))]
pub enum DayPhase {
#[default]
Morning,
Expand Down
Loading