Nu går det fint att skapa tournaments med teams och prizes
This commit is contained in:
39
MVCUI/Models/TournamentMVCModel.cs
Normal file
39
MVCUI/Models/TournamentMVCModel.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using TrackerLibrary.Models;
|
||||
|
||||
namespace MVCUI.Models
|
||||
{
|
||||
public class TournamentMVCModel
|
||||
{
|
||||
[Display(Name = "Tournament Name")]
|
||||
[StringLength(100, MinimumLength = 2)]
|
||||
[Required]
|
||||
public string TournamentName { get; set; }
|
||||
/// <summary>
|
||||
/// The amount of money each team needs to put up to enter
|
||||
/// </summary>
|
||||
[Display(Name = "Entry Fee")]
|
||||
[DataType(DataType.Currency)]
|
||||
[Required]
|
||||
public decimal EntryFee { get; set; }
|
||||
/// <summary>
|
||||
/// The set of teams that have entered
|
||||
/// </summary>
|
||||
[Display(Name = "Entered Teams")]
|
||||
public List<SelectListItem> EnteredTeams { get; set; } = new List<SelectListItem>();
|
||||
/// <summary>
|
||||
/// The list of prizes for various places
|
||||
/// </summary>
|
||||
public List<string> SelectedEnteredTeams { get; set; } = new List<string>();
|
||||
|
||||
[Display(Name = "Prizes")]
|
||||
public List<SelectListItem> Prizes { get; set; } = new List<SelectListItem>();
|
||||
public List<string> SelectedPrizes { get; set; } = new List<string>();
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user