Wireup window with access methods + refaktor structure
This commit is contained in:
23
TrackerLibrary/Models/MatchupEntryModel.cs
Normal file
23
TrackerLibrary/Models/MatchupEntryModel.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace TrackerLibrary.Models
|
||||
{
|
||||
public class MatchupEntryModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents one team in the matchup
|
||||
/// </summary>
|
||||
public TeamModel TeamCompeting { get; set; }
|
||||
/// <summary>
|
||||
/// Represents the score for this particular team
|
||||
/// </summary>
|
||||
public double Score { get; set; }
|
||||
/// <summary>
|
||||
/// Represents the matchup that this team came
|
||||
/// from as winner
|
||||
/// </summary>
|
||||
public MatchupModel ParentMatchup { get; set; }
|
||||
}
|
||||
}
|
||||
25
TrackerLibrary/Models/MatchupModel.cs
Normal file
25
TrackerLibrary/Models/MatchupModel.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace TrackerLibrary.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents one match in the tournament.
|
||||
/// </summary>
|
||||
public class MatchupModel
|
||||
{
|
||||
/// <summary>
|
||||
/// The set of teams that were involved in this match.
|
||||
/// </summary>
|
||||
public List<MatchupEntryModel> Entries { get; set; } = new List<MatchupEntryModel>();
|
||||
/// <summary>
|
||||
/// The winner of the match.
|
||||
/// </summary>
|
||||
public TeamModel Winner { get; set; }
|
||||
/// <summary>
|
||||
/// Which round this match is a part of.
|
||||
/// </summary>
|
||||
public int MatchupRound { get; set; }
|
||||
}
|
||||
}
|
||||
14
TrackerLibrary/Models/PersonModel.cs
Normal file
14
TrackerLibrary/Models/PersonModel.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace TrackerLibrary.Models
|
||||
{
|
||||
public class PersonModel
|
||||
{
|
||||
public string FirstName { get; set; }
|
||||
public string LastName { get; set; }
|
||||
public string EmailAddress { get; set; }
|
||||
public string CellPhoneNumber { get; set; }
|
||||
}
|
||||
}
|
||||
40
TrackerLibrary/Models/PrizeModel.cs
Normal file
40
TrackerLibrary/Models/PrizeModel.cs
Normal file
@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace TrackerLibrary.Models
|
||||
{
|
||||
public class PrizeModel
|
||||
|
||||
{
|
||||
/// <summary>
|
||||
/// The unique identifier for the prize
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
public int PlaceNumber { get; set; }
|
||||
public string PlaceName { get; set; }
|
||||
public decimal PrizeAmount { get; set; }
|
||||
public double PrizePercentage { get; set; }
|
||||
|
||||
public PrizeModel()
|
||||
{
|
||||
|
||||
}
|
||||
public PrizeModel(string placeName, string placeNumber, string prizeAmount, string prizePercentage)
|
||||
{
|
||||
PlaceName = placeName;
|
||||
|
||||
int placeNumberValue = 0;
|
||||
int.TryParse(placeNumber, out placeNumberValue);
|
||||
PlaceNumber = placeNumberValue;
|
||||
|
||||
decimal prizeAmountValue = 0;
|
||||
decimal.TryParse(prizeAmount, out prizeAmountValue);
|
||||
PrizeAmount = prizeAmountValue;
|
||||
|
||||
double prizePercentageValue = 0;
|
||||
double.TryParse(prizePercentage, out prizePercentageValue);
|
||||
PrizePercentage = prizePercentageValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
12
TrackerLibrary/Models/TeamModel.cs
Normal file
12
TrackerLibrary/Models/TeamModel.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace TrackerLibrary.Models
|
||||
{
|
||||
public class TeamModel
|
||||
{
|
||||
public List<PersonModel> TeamMembers { get; set; } = new List<PersonModel>();
|
||||
public string TeamName { get; set; }
|
||||
}
|
||||
}
|
||||
15
TrackerLibrary/Models/TournamentModel.cs
Normal file
15
TrackerLibrary/Models/TournamentModel.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace TrackerLibrary.Models
|
||||
{
|
||||
public class TournamentModel
|
||||
{
|
||||
public string TournamentName { get; set; }
|
||||
public decimal EntryFee { get; set; }
|
||||
public List<Models.TeamModel> EnteredTeams { get; set; } = new List<Models.TeamModel>();
|
||||
public List<Models.PrizeModel> Prizes { get; set; } = new List<Models.PrizeModel>();
|
||||
public List<List<Models.MatchupModel>> MyProperty { get; set; } = new List<List<Models.MatchupModel>>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user