repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/club/player/training/mod.rs
src/core/src/club/player/training/mod.rs
pub mod history; pub mod result; pub mod training; pub use history::*; pub use training::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/club/player/calculators/mod.rs
src/core/src/club/player/calculators/mod.rs
mod calculator; pub use calculator::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/club/player/calculators/calculator.rs
src/core/src/club/player/calculators/calculator.rs
use crate::{Person, Player, PlayerStatusType}; use chrono::{Datelike, NaiveDate}; pub struct PlayerValueCalculator; impl PlayerValueCalculator { pub fn calculate(player: &Player, now: NaiveDate) -> f64 { let base_value = determine_base_value(player); let age_factor = determine_age_factor(player, n...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/club/player/mailbox/mailbox.rs
src/core/src/club/player/mailbox/mailbox.rs
use crate::handlers::ProcessContractHandler; use crate::{Player, PlayerMailboxResult, PlayerResult}; use chrono::NaiveDate; use std::collections::VecDeque; use std::sync::Mutex; #[derive(Debug)] pub struct PlayerMessage { pub message_type: PlayerMessageType, } #[derive(Debug)] pub enum PlayerMessageType { Gre...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/club/player/mailbox/result.rs
src/core/src/club/player/mailbox/result.rs
pub struct PlayerMailboxResult; impl PlayerMailboxResult { pub fn new() -> Self { PlayerMailboxResult {} } }
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/club/player/mailbox/mod.rs
src/core/src/club/player/mailbox/mod.rs
pub mod handlers; pub mod mailbox; pub mod result; pub use mailbox::*; pub use result::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/club/player/mailbox/handlers/contract_proposal.rs
src/core/src/club/player/mailbox/handlers/contract_proposal.rs
use crate::handlers::AcceptContractHandler; use crate::{PersonBehaviourState, Player, PlayerContractProposal, PlayerResult}; use chrono::NaiveDate; pub struct ProcessContractHandler; impl ProcessContractHandler { pub fn process( player: &mut Player, proposal: PlayerContractProposal, now: N...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/club/player/mailbox/handlers/mod.rs
src/core/src/club/player/mailbox/handlers/mod.rs
mod accept_contract; mod contract_proposal; pub use accept_contract::*; pub use contract_proposal::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/club/player/mailbox/handlers/accept_contract.rs
src/core/src/club/player/mailbox/handlers/accept_contract.rs
use crate::{ContractType, Player, PlayerClubContract, PlayerContractProposal, PlayerSquadStatus}; use chrono::NaiveDate; pub struct AcceptContractHandler; impl AcceptContractHandler { pub fn process(player: &mut Player, proposal: PlayerContractProposal, now: NaiveDate) { player.contract = Some(PlayerClubC...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/club/player/contract/contract.rs
src/core/src/club/player/contract/contract.rs
use crate::context::SimulationContext; pub use chrono::prelude::{DateTime, Datelike, NaiveDate, Utc}; use chrono::NaiveDateTime; #[derive(Debug)] pub enum ContractType { PartTime, FullTime, Amateur, Youth, NonContract, } #[derive(Debug)] pub enum PlayerSquadStatus { Invalid, NotYetSet, ...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/club/player/contract/mod.rs
src/core/src/club/player/contract/mod.rs
pub mod contract; pub use contract::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/utils/date.rs
src/core/src/utils/date.rs
use chrono::prelude::*; use chrono::NaiveDate; pub struct DateUtils; impl DateUtils { #[inline] pub fn is_birthday(birth_date: NaiveDate, current_date: NaiveDate) -> bool { birth_date.month() == current_date.month() && birth_date.day() == current_date.day() } #[inline] pub fn age(birthdat...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/utils/estimation.rs
src/core/src/utils/estimation.rs
use std::future::Future; use std::pin::Pin; use std::time::Instant; pub struct TimeEstimation; impl TimeEstimation { pub fn estimate<T, F: FnOnce() -> T>(action: F) -> (T, u32) { let now = Instant::now(); let result = action(); (result, now.elapsed().as_millis() as u32) } pub as...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/utils/mod.rs
src/core/src/utils/mod.rs
mod date; mod estimation; pub mod formatting; mod logging; mod random; mod strings; pub use date::*; pub use estimation::*; pub use formatting::*; pub use logging::*; pub use random::*; pub use strings::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/utils/strings.rs
src/core/src/utils/strings.rs
extern crate rand; use rand::*; pub struct StringUtils; impl StringUtils { #[inline] pub fn random_string(n: i32) -> String { (0..n) .map(|i| { if i == 0 { (65 + random::<u8>() % 26) as char } else { (97 + random::<u8...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/utils/logging.rs
src/core/src/utils/logging.rs
use crate::utils::TimeEstimation; use log::{debug, warn}; const MAX_DURATION_THRESHOLD_MS: u32 = 100; pub struct Logging; impl Logging { pub fn estimate<F: FnOnce()>(action: F, message: &str) { let (_, duration_ms) = TimeEstimation::estimate(action); debug!("{}, {}ms", message, duration_ms); ...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/utils/formatting.rs
src/core/src/utils/formatting.rs
pub struct FormattingUtils; impl FormattingUtils { #[inline] pub fn format_money(amount: f64) -> String { let val = amount.abs(); if val >= 1_000_000.0 { format!("{:.1}M", amount / 1_000_000.0) } else if val >= 1_000.0 { format!("{:.1}K", amount / 1_000.0) ...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/utils/random/integers.rs
src/core/src/utils/random/integers.rs
extern crate rand; use rand::*; pub struct IntegerUtils; impl IntegerUtils { #[inline] pub fn random(min: i32, max: i32) -> i32 { let random_val: f64 = random(); min + (random_val * ((max - min) as f64)) as i32 } } #[cfg(test)] mod tests { use super::*; #[test] fn random_seq...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/utils/random/floats.rs
src/core/src/utils/random/floats.rs
extern crate rand; use rand::*; pub struct FloatUtils; impl FloatUtils { #[inline] pub fn random(min: f32, max: f32) -> f32 { let random_val: f32 = random(); min + (random_val * (max - min)) } }
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/utils/random/mod.rs
src/core/src/utils/random/mod.rs
pub mod floats; mod integers; pub use floats::*; pub use integers::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/league/season.rs
src/core/src/league/season.rs
#[derive(Debug)] pub enum Season { OneYear(u16), TwoYear(u16, u16), }
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/league/result.rs
src/core/src/league/result.rs
use crate::league::{LeagueTableResult, ScheduleItem}; use crate::r#match::{GoalDetail, MatchResult, Score, TeamScore}; use crate::simulator::SimulatorData; use crate::{MatchHistoryItem, SimulationResult}; use chrono::NaiveDateTime; pub struct LeagueResult { pub league_id: u32, pub table_result: LeagueTableResu...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/league/mod.rs
src/core/src/league/mod.rs
mod collection; mod context; mod league; pub mod result; pub mod schedule; mod season; pub mod storages; pub mod table; pub use collection::*; pub use context::*; pub use league::*; pub use result::*; pub use schedule::*; pub use season::*; pub use storages::*; pub use table::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/league/league.rs
src/core/src/league/league.rs
use crate::context::{GlobalContext, SimulationContext}; use crate::league::{LeagueMatch, LeagueMatchResultResult, LeagueResult, LeagueTable, MatchStorage, Schedule, ScheduleItem}; use crate::r#match::{Match, MatchResult}; use crate::utils::Logging; use crate::{Club, Team}; use chrono::{Datelike, NaiveDate}; use log::{d...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
true
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/league/context.rs
src/core/src/league/context.rs
#[derive(Clone)] pub struct LeagueContext<'l> { pub id: u32, pub slug: String, pub team_ids: &'l [u32], } impl<'l> LeagueContext<'l> { pub fn new(id: u32, slug: String, team_ids: &'l [u32]) -> Self { LeagueContext { id, slug, team_ids } } }
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/league/collection.rs
src/core/src/league/collection.rs
use crate::context::GlobalContext; use crate::league::{League, LeagueResult}; use crate::{Club, Logging}; use rayon::iter::IntoParallelRefMutIterator; use rayon::iter::ParallelIterator; pub struct LeagueCollection { pub leagues: Vec<League>, } impl LeagueCollection { pub fn new(leagues: Vec<League>) -> Self {...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/league/schedule/schedule.rs
src/core/src/league/schedule/schedule.rs
use crate::context::GlobalContext; use crate::league::round::RoundSchedule; use crate::league::{LeagueMatch, LeagueSettings, ScheduleGenerator, ScheduleResult, Season}; use crate::r#match::Score; use chrono::{Datelike, NaiveDate, NaiveDateTime}; use log::error; #[derive(Debug, Default)] pub struct Schedule { pub t...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/league/schedule/result.rs
src/core/src/league/schedule/result.rs
use crate::league::LeagueMatch; pub struct ScheduleResult { pub generated: bool, pub scheduled_matches: Vec<LeagueMatch>, } impl ScheduleResult { pub fn new() -> Self { ScheduleResult { generated: false, scheduled_matches: Vec::new(), } } pub fn is_match_sc...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/league/schedule/round.rs
src/core/src/league/schedule/round.rs
use crate::league::{ LeagueSettings, ScheduleError, ScheduleGenerator, ScheduleItem, ScheduleTour, Season, }; use crate::utils::DateUtils; use chrono::prelude::*; use chrono::Duration; use chrono::NaiveDate; use log::warn; // const DAY_PLAYING_TIMES: [(u8, u8); 4] = [(13, 0), (14, 0), (16, 0), (18, 0)]; pub struc...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/league/schedule/mod.rs
src/core/src/league/schedule/mod.rs
pub mod result; pub mod round; pub mod schedule; use crate::league::{LeagueSettings, Season}; pub use result::*; pub use schedule::*; pub trait ScheduleGenerator { fn generate( &self, league_id: u32, league_slug: &str, season: Season, teams: &[u32], league_settings:...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/league/storages/match_storage.rs
src/core/src/league/storages/match_storage.rs
use crate::r#match::MatchResult; use std::collections::HashMap; #[derive(Debug)] pub struct MatchStorage { results: HashMap<String, MatchResult>, } impl Default for MatchStorage { fn default() -> Self { Self::new() } } impl MatchStorage { pub fn new() -> Self { MatchStorage { ...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/league/storages/mod.rs
src/core/src/league/storages/mod.rs
pub mod match_storage; pub use match_storage::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/league/table/table.rs
src/core/src/league/table/table.rs
use crate::context::GlobalContext; use crate::league::LeagueTableResult; use crate::r#match::MatchResult; use std::cmp::Ordering; #[derive(Debug)] pub struct LeagueTable { pub rows: Vec<LeagueTableRow>, } impl LeagueTable { pub fn new(teams: &[u32]) -> Self { LeagueTable { rows: Self::gene...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/league/table/result.rs
src/core/src/league/table/result.rs
pub struct LeagueTableResult {}
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/league/table/mod.rs
src/core/src/league/table/mod.rs
pub mod result; pub mod table; pub use result::*; pub use table::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/country/builder.rs
src/core/src/country/builder.rs
use crate::league::LeagueCollection; use crate::transfers::market::TransferMarket; use crate::{Club, Country, CountryEconomicFactors, CountryGeneratorData, CountryRegulations, InternationalCompetition, MediaCoverage}; #[derive(Default)] pub struct CountryBuilder { id: Option<u32>, code: Option<String>, slu...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/country/country.rs
src/core/src/country/country.rs
use crate::context::GlobalContext; use crate::country::CountryResult; use crate::league::LeagueCollection; use crate::transfers::market::{TransferMarket}; use crate::utils::Logging; use crate::{Club, ClubResult}; use chrono::{NaiveDate}; use log::{debug, info}; use std::collections::HashMap; use crate::country::builder...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/country/result.rs
src/core/src/country/result.rs
use chrono::Datelike; use chrono::NaiveDate; use log::{debug, info}; use crate::league::LeagueResult; use crate::simulator::SimulatorData; use crate::{Club, ClubResult, ClubTransferStrategy, Country, SimulationResult}; use crate::shared::{Currency, CurrencyValue}; use crate::transfers::{TransferListing, TransferListing...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/country/mod.rs
src/core/src/country/mod.rs
mod context; pub mod country; mod result; mod builder; pub use context::*; pub use country::*; pub use result::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/country/context.rs
src/core/src/country/context.rs
#[derive(Clone)] pub struct CountryContext { pub id: u32, } impl CountryContext { pub fn new(id: u32) -> Self { CountryContext { id } } }
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/transfers/offer.rs
src/core/src/transfers/offer.rs
use crate::shared::CurrencyValue; use chrono::NaiveDate; #[derive(Debug, Clone)] pub struct TransferOffer { pub base_fee: CurrencyValue, pub clauses: Vec<TransferClause>, pub salary_contribution: Option<CurrencyValue>, // For loans pub contract_length: Option<u8>, // Years pub offering_club_id: u32...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/transfers/transfer.rs
src/core/src/transfers/transfer.rs
use crate::shared::CurrencyValue; use crate::Player; use chrono::{Datelike, NaiveDate}; pub struct PlayerTransfer { pub player: Player, pub club_id: u32, } impl PlayerTransfer { pub fn new(player: Player, club_id: u32) -> Self { PlayerTransfer { player, club_id } } } #[derive(Debug, Clone)] p...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/transfers/market.rs
src/core/src/transfers/market.rs
use crate::shared::CurrencyValue; use crate::transfers::negotiation::{NegotiationStatus, TransferNegotiation}; use crate::transfers::offer::TransferOffer; use crate::transfers::{CompletedTransfer, TransferType}; use chrono::NaiveDate; use std::collections::HashMap; #[derive(Debug, Clone)] pub struct TransferMarket { ...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/transfers/mod.rs
src/core/src/transfers/mod.rs
pub mod pool; pub mod transfer; pub mod market; pub mod negotiation; pub mod offer; pub mod window; pub use market::*; pub use negotiation::*; pub use offer::*; pub use pool::*; pub use transfer::*; pub use window::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/transfers/window.rs
src/core/src/transfers/window.rs
use crate::shared::CurrencyValue; use crate::{Person, Player, PlayerValueCalculator}; use chrono::{Datelike, NaiveDate}; use std::collections::HashMap; #[derive(Debug)] pub struct TransferWindowManager { pub windows: HashMap<u32, TransferWindow>, // Keyed by country_id } #[derive(Debug, Clone)] pub struct Transfe...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/transfers/negotiation.rs
src/core/src/transfers/negotiation.rs
use crate::transfers::offer::TransferOffer; use chrono::NaiveDate; #[derive(Debug, Clone)] pub struct TransferNegotiation { pub id: u32, pub player_id: u32, pub listing_id: u32, pub selling_club_id: u32, pub buying_club_id: u32, pub current_offer: TransferOffer, pub counter_offers: Vec<Tran...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/transfers/pool.rs
src/core/src/transfers/pool.rs
use std::collections::HashMap; use std::sync::Mutex; pub struct TransferPool<T> { pool: Mutex<HashMap<u32, Vec<T>>>, } impl<T> TransferPool<T> { pub fn new() -> Self { TransferPool { pool: Mutex::new(HashMap::new()), } } pub fn push_transfer(&mut self, item: T, club_id: u3...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/continent/result.rs
src/core/src/continent/result.rs
use crate::continent::{ CompetitionTier, Continent, ContinentalCompetitions, ContinentalMatchResult, ContinentalRankings, }; use crate::country::CountryResult; use crate::simulator::SimulatorData; use crate::transfers::CompletedTransfer; use crate::{Club, Country, SimulationResult}; use chrono::Datelike; use ch...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/continent/mod.rs
src/core/src/continent/mod.rs
pub mod context; mod continent; mod result; mod tournaments; pub use context::*; pub use continent::*; pub use result::*; pub use tournaments::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/continent/context.rs
src/core/src/continent/context.rs
#[derive(Clone)] pub struct ContinentContext { id: u32 } impl ContinentContext { pub fn new(id: u32) -> Self { ContinentContext { id } } }
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/continent/continent.rs
src/core/src/continent/continent.rs
use crate::context::GlobalContext; use crate::continent::ContinentResult; use crate::country::CountryResult; use crate::utils::Logging; use crate::{Club, Country}; use chrono::NaiveDate; use log::{debug, info}; use std::collections::HashMap; pub struct Continent { pub id: u32, pub name: String, pub countri...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/continent/tournaments/league_europe.rs
src/core/src/continent/tournaments/league_europe.rs
use crate::context::GlobalContext; use crate::continent::{Tournament, TournamentContext}; pub struct LeagueEurope {} impl LeagueEurope {} impl Tournament for LeagueEurope { fn simulate(&mut self, _: &mut TournamentContext, _: GlobalContext<'_>) {} }
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/continent/tournaments/mod.rs
src/core/src/continent/tournaments/mod.rs
mod champion_league; mod context; mod league_europe; use crate::context::GlobalContext; pub use context::*; pub trait Tournament { fn simulate(&mut self, tournament_ctx: &mut TournamentContext, ctx: GlobalContext<'_>); }
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/continent/tournaments/context.rs
src/core/src/continent/tournaments/context.rs
pub struct TournamentContext {} impl TournamentContext { pub fn new() -> Self { TournamentContext {} } }
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/continent/tournaments/champion_league.rs
src/core/src/continent/tournaments/champion_league.rs
use crate::context::GlobalContext; use crate::continent::{Tournament, TournamentContext}; pub struct ChampionLeague {} impl ChampionLeague {} impl Tournament for ChampionLeague { fn simulate(&mut self, _: &mut TournamentContext, _: GlobalContext<'_>) {} }
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/shared/fullname.rs
src/core/src/shared/fullname.rs
use std::fmt::{Display, Formatter, Result}; #[derive(Debug)] pub struct FullName { pub first_name: String, pub last_name: String, pub middle_name: Option<String>, } impl FullName { pub fn new(first_name: String, last_name: String) -> Self { FullName { first_name, last_n...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/shared/mod.rs
src/core/src/shared/mod.rs
pub mod currency; pub mod fullname; pub mod indexes; pub mod location; pub use currency::*; pub use fullname::*; pub use indexes::*; pub use location::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/shared/currency.rs
src/core/src/shared/currency.rs
#[derive(Debug, Clone)] pub struct CurrencyValue { pub amount: f64, pub currency: Currency, } impl CurrencyValue { pub fn new(amount: f64, currency: Currency) -> Self { CurrencyValue { amount, currency } } } #[derive(Debug, Clone)] pub enum Currency { Usd, }
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/shared/location.rs
src/core/src/shared/location.rs
#[derive(Debug)] pub struct Location { pub city_id: u32, } impl Location { pub fn new(city_id: u32) -> Self { Location { city_id } } }
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/shared/indexes/mod.rs
src/core/src/shared/indexes/mod.rs
pub mod simulator_indexes; pub use simulator_indexes::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/shared/indexes/simulator_indexes.rs
src/core/src/shared/indexes/simulator_indexes.rs
use crate::SimulatorData; use std::collections::HashMap; pub struct SimulatorDataIndexes { pub league_indexes: HashMap<u32, (u32, u32)>, pub club_indexes: HashMap<u32, (u32, u32)>, pub team_indexes: HashMap<u32, (u32, u32, u32)>, pub player_indexes: HashMap<u32, (u32, u32, u32, u32)>, pub team_data...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/lib.rs
src/server/src/lib.rs
mod countries; mod date; mod error; mod game; mod leagues; mod r#match; mod player; mod routes; mod teams; pub use error::{ApiError, ApiResult}; use crate::routes::ServerRoutes; use axum::response::IntoResponse; use core::SimulatorData; use database::DatabaseEntity; use log::{error, info}; use std::net::SocketAddr; u...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/error.rs
src/server/src/error.rs
use axum::http::StatusCode; use axum::response::{IntoResponse, Response}; use axum::Json; use serde_json::json; /// Custom error type for API handlers #[derive(Debug)] pub enum ApiError { NotFound(String), InternalError(String), BadRequest(String), } impl IntoResponse for ApiError { fn into_response(s...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/routes.rs
src/server/src/routes.rs
use crate::countries::country_routes; use crate::date::current_date_routes; use crate::game::game_routes; use crate::leagues::league_routes; use crate::player::player_routes; use crate::r#match::routes::match_routes; use crate::teams::team_routes; use crate::GameAppData; use axum::routing::get_service; use axum::Router...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/match/mod.rs
src/server/src/match/mod.rs
pub mod chunk; mod get; pub mod routes; pub mod stores;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/match/chunk.rs
src/server/src/match/chunk.rs
use crate::{ApiError, ApiResult, GameAppData}; use crate::r#match::stores::MatchStore; use axum::extract::{Path, State}; use axum::http::StatusCode; use axum::response::{IntoResponse, Response}; use axum::Json; use serde::{Deserialize, Serialize}; #[derive(Deserialize)] pub struct MatchChunkRequest { pub league_sl...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/match/routes.rs
src/server/src/match/routes.rs
use crate::r#match::chunk::{match_chunk_action, match_metadata_action}; use crate::GameAppData; use axum::routing::get; use axum::Router; use crate::r#match::get::match_get_action; pub fn match_routes() -> Router<GameAppData> { Router::new() .route("/api/match/{league_slug}/{match_id}", get(match_get_actio...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/match/get.rs
src/server/src/match/get.rs
use crate::{ApiError, ApiResult, GameAppData}; use axum::extract::{Path, State}; use axum::response::{IntoResponse, Response}; use axum::Json; use core::SimulatorData; use serde::{Deserialize, Serialize}; pub async fn match_get_action( State(state): State<GameAppData>, Path(route_params): Path<MatchGetRequest...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/match/stores/match.rs
src/server/src/match/stores/match.rs
use async_compression::tokio::write::GzipEncoder; use core::r#match::{MatchResult, ResultMatchPositionData}; use log::{debug, info}; use std::path::PathBuf; use tokio::fs::File; use tokio::io::{AsyncReadExt, AsyncWriteExt}; const MATCH_DIRECTORY: &str = "matches"; const CHUNK_DURATION_MS: u64 = 300_000; // 5 minutes p...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/match/stores/mod.rs
src/server/src/match/stores/mod.rs
pub mod r#match; pub use r#match::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/teams/schedule.rs
src/server/src/teams/schedule.rs
use crate::GameAppData; use axum::extract::{Path, State}; use axum::response::{IntoResponse, Response}; use axum::Json; use core::{SimulatorData, Team}; use serde::{Deserialize, Serialize}; #[derive(Deserialize)] pub struct TeamScheduleGetRequest { team_slug: String, } #[derive(Serialize)] pub struct TeamSchedul...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/teams/mod.rs
src/server/src/teams/mod.rs
mod get; pub mod routes; mod schedule; pub use get::*; pub use routes::*; pub use schedule::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/teams/routes.rs
src/server/src/teams/routes.rs
use crate::teams::{team_get_action, team_schedule_get_action}; use crate::GameAppData; use axum::routing::get; use axum::Router; pub fn team_routes() -> Router<GameAppData> { Router::new() .route("/api/teams/{team_slug}", get(team_get_action)) .route( "/api/teams/{team_slug}/schedule", ...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/teams/get.rs
src/server/src/teams/get.rs
use crate::{ApiError, ApiResult, GameAppData}; use crate::player::PlayerStatusDto; use axum::extract::{Path, State}; use axum::response::{IntoResponse, Response}; use axum::Json; use core::Player; use core::PlayerPositionType; use core::utils::FormattingUtils; use core::{SimulatorData, Team}; use serde::{Deserialize, ...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/date/current_date.rs
src/server/src/date/current_date.rs
use crate::GameAppData; use axum::extract::State; use axum::response::{IntoResponse, Response}; use axum::Json; use chrono::Utc; use serde::Serialize; #[derive(Serialize)] pub struct CurrentDateModel { pub date: String, pub time: String, } pub async fn current_date_action(State(state): State<GameAppData>) ->...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/date/mod.rs
src/server/src/date/mod.rs
pub mod current_date; pub mod routes; pub use current_date::*; pub use routes::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/date/routes.rs
src/server/src/date/routes.rs
use crate::date::current_date_action; use crate::GameAppData; use axum::routing::get; use axum::Router; pub fn current_date_routes() -> Router<GameAppData> { Router::new().route("/api/date", get(current_date_action)) }
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/countries/list.rs
src/server/src/countries/list.rs
use crate::{ApiError, ApiResult, GameAppData}; use axum::extract::State; use axum::response::{IntoResponse, Response}; use axum::Json; use serde::Serialize; #[derive(Serialize)] pub struct CountryListViewModel<'c> { pub name: &'c str, pub countries: Vec<CountryDto<'c>>, } #[derive(Serialize)] pub struct Coun...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/countries/mod.rs
src/server/src/countries/mod.rs
mod get; mod list; pub mod routes; pub use get::*; pub use list::*; pub use routes::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/countries/routes.rs
src/server/src/countries/routes.rs
use crate::countries::{country_get_action, country_list_action}; use crate::GameAppData; use axum::routing::get; use axum::Router; pub fn country_routes() -> Router<GameAppData> { Router::new() .route("/api/countries", get(country_list_action)) .route("/api/countries/{country_slug}", get(country_ge...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/countries/get.rs
src/server/src/countries/get.rs
use crate::{ApiError, ApiResult, GameAppData}; use axum::extract::{Path, State}; use axum::response::{IntoResponse, Response}; use axum::Json; use core::Country; use serde::{Deserialize, Serialize}; #[derive(Deserialize)] pub struct CountryGetRequest { country_slug: String, } #[derive(Serialize)] pub struct Coun...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/leagues/mod.rs
src/server/src/leagues/mod.rs
mod get; pub mod routes; pub use get::*; pub use routes::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/leagues/routes.rs
src/server/src/leagues/routes.rs
use crate::leagues::league_get_action; use crate::GameAppData; use axum::routing::get; use axum::Router; pub fn league_routes() -> Router<GameAppData> { Router::new().route("/api/leagues/{league_slug}", get(league_get_action)) }
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/leagues/get.rs
src/server/src/leagues/get.rs
use crate::{ApiError, ApiResult, GameAppData}; use axum::extract::{Path, State}; use axum::response::{IntoResponse, Response}; use axum::Json; use chrono::Duration; use core::league::ScheduleTour; use itertools::*; use serde::{Deserialize, Serialize}; use core::r#match::Score; use core::r#match::player::statistics::Ma...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/game/process.rs
src/server/src/game/process.rs
use crate::r#match::stores::MatchStore; use crate::GameAppData; use axum::extract::State; use axum::http::{StatusCode}; use axum::response::IntoResponse; use axum::Json; use core::FootballSimulator; use core::SimulationResult; use log::{debug}; use std::sync::Arc; use std::time::Instant; use tokio::task::JoinSet; pub...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/game/mod.rs
src/server/src/game/mod.rs
mod create; mod process; pub mod routes; pub use create::*; pub use process::*; pub use routes::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/game/routes.rs
src/server/src/game/routes.rs
use crate::game::{game_create_action, game_process_action}; use crate::GameAppData; use axum::routing::{get, post}; use axum::Router; pub fn game_routes() -> Router<GameAppData> { Router::new() .route("/api/game/create", get(game_create_action)) .route("/api/game/process", post(game_process_action)...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/game/create.rs
src/server/src/game/create.rs
use crate::GameAppData; use axum::extract::State; use axum::http::{HeaderMap, StatusCode}; use axum::response::IntoResponse; use axum::Json; use core::utils::TimeEstimation; use database::DatabaseGenerator; pub async fn game_create_action(State(state): State<GameAppData>) -> impl IntoResponse { let mut state_data...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/player/mod.rs
src/server/src/player/mod.rs
mod get; pub mod routes; pub use get::*; pub use routes::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/player/routes.rs
src/server/src/player/routes.rs
use crate::player::player_get_action; use crate::GameAppData; use axum::routing::get; use axum::Router; pub fn player_routes() -> Router<GameAppData> { Router::new().route( "/api/teams/{team_slug}/players/{player_id}", get(player_get_action), ) }
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/server/src/player/get.rs
src/server/src/player/get.rs
use crate::{ApiError, ApiResult, GameAppData}; use axum::extract::{Path, State}; use axum::response::{IntoResponse, Response}; use axum::Json; use core::Player; use core::PlayerStatusType; use core::utils::FormattingUtils; use core::SimulatorData; use core::Team; use itertools::Itertools; use serde::{Deserialize, Seri...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/database/src/lib.rs
src/database/src/lib.rs
mod generators; mod loaders; pub use loaders::{ ClubEntity, ClubLoader, ContinentEntity, ContinentLoader, CountryEntity, CountryLoader, LeagueEntity, LeagueLoader, NamesByCountryEntity, NamesByCountryLoader, }; pub use generators::DatabaseGenerator; pub struct DatabaseEntity { pub continents: Vec<Contine...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/database/src/generators/player.rs
src/database/src/generators/player.rs
use chrono::{Datelike, NaiveDate, Utc}; use core::shared::FullName; use core::utils::{FloatUtils, IntegerUtils, StringUtils}; use core::{ Mental, PeopleNameGeneratorData, PersonAttributes, Physical, Player, PlayerAttributes, PlayerClubContract, PlayerPosition, PlayerPositionType, PlayerPositions, PlayerSkil...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/database/src/generators/staff.rs
src/database/src/generators/staff.rs
use chrono::{Datelike, NaiveDate, Utc}; use core::shared::FullName; use core::utils::FloatUtils; use core::utils::{IntegerUtils, StringUtils}; use core::{ CoachFocus, MentalFocusType, PeopleNameGeneratorData, PersonAttributes, PhysicalFocusType, Staff, StaffAttributes, StaffClubContract, StaffCoaching, StaffDat...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/database/src/generators/generator.rs
src/database/src/generators/generator.rs
use crate::generators::{PlayerGenerator, PositionType, StaffGenerator}; use crate::loaders::ContinentEntity; use crate::DatabaseEntity; use chrono::{NaiveDate, NaiveDateTime}; use core::club::academy::ClubAcademy; use core::context::NaiveTime; use core::continent::Continent; use core::league::LeagueCollection; use core...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/database/src/generators/mod.rs
src/database/src/generators/mod.rs
pub mod generator; pub mod player; pub mod staff; pub use generator::*; pub use player::*; pub use staff::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/database/src/loaders/names.rs
src/database/src/loaders/names.rs
use serde::Deserialize; const STATIC_NAME_BY_COUNTRY_JSON: &str = include_str!("../data/names/names_by_country.json"); #[derive(Deserialize)] pub struct NamesByCountryEntity { pub country_id: u32, pub first_names: Vec<String>, pub last_names: Vec<String>, } pub struct NamesByCountryLoader; impl NamesByC...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/database/src/loaders/country.rs
src/database/src/loaders/country.rs
use serde::Deserialize; const STATIC_COUNTRIES_JSON: &str = include_str!("../data/countries.json"); #[derive(Deserialize)] pub struct CountryEntity { pub id: u32, pub code: String, pub slug: String, pub name: String, pub continent_id: u32, pub reputation: u16, } pub struct CountryLoader; imp...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/database/src/loaders/club.rs
src/database/src/loaders/club.rs
use serde::Deserialize; const STATIC_CLUB_JSON: &'static str = include_str!("../data/clubs.json"); #[derive(Deserialize)] pub struct ClubEntity { pub id: u32, pub name: String, pub country_id: u32, pub location: ClubLocationEntity, pub finance: ClubFinanceEntity, pub teams: Vec<ClubTeamEntity>...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/database/src/loaders/mod.rs
src/database/src/loaders/mod.rs
pub mod country; mod league; mod club; mod continent; mod names; pub use country::*; pub use league::*; pub use club::*; pub use continent::*; pub use names::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false