2020-01-27 23:37:28 +01:00
|
|
|
|
using Common;
|
2020-01-29 16:32:23 +01:00
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
2020-01-27 23:37:28 +01:00
|
|
|
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace WebInterface
|
|
|
|
|
{
|
2020-01-29 16:32:23 +01:00
|
|
|
|
[RequestFormLimits(MultipartBodyLengthLimit = Constants.FileSizeLimit)]
|
|
|
|
|
[RequestSizeLimit(Constants.FileSizeLimit)]
|
2020-01-27 23:37:28 +01:00
|
|
|
|
public class PrivateViewModel
|
|
|
|
|
{
|
|
|
|
|
[Required]
|
|
|
|
|
[Display(Name = "Required players")]
|
|
|
|
|
public int Players { get; set; }
|
|
|
|
|
[Required]
|
|
|
|
|
[Display(Name = "Select mod")]
|
|
|
|
|
public string ModName { get; set; }
|
|
|
|
|
public List<SelectListItem> ModNames { get; } = Constants.SupportedMods
|
|
|
|
|
.Select(m => new SelectListItem(m.Value.FriendlyName, m.Value.Name))
|
|
|
|
|
.ToList();
|
2020-01-29 16:32:23 +01:00
|
|
|
|
|
|
|
|
|
[Display(Name = "Custom map (optional)")]
|
|
|
|
|
public IFormFile FormFile { get; set; }
|
2020-01-27 23:37:28 +01:00
|
|
|
|
}
|
|
|
|
|
}
|