Cleanup inside models
This commit is contained in:
@@ -80,7 +80,7 @@ namespace pointMaster.Controllers
|
||||
|
||||
vm.Add(new StatModel
|
||||
{
|
||||
Title = "Points givet",
|
||||
Title = "Points givet ialt",
|
||||
Value = pointData.Sum(x => x.Points + x.Turnout).ToString()
|
||||
});
|
||||
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
public class Patrulje
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = null!;
|
||||
public List<PatruljeMedlem> PatruljeMedlems { get; set; } = null!;
|
||||
public List<Point> Points { get; set; } = null!;
|
||||
public string Name { get; set; }
|
||||
public List<PatruljeMedlem> PatruljeMedlems { get; set; }
|
||||
public List<Point> Points { get; set; }
|
||||
public DateTime? DateCreated { get; set; }
|
||||
}
|
||||
|
||||
public class PatruljeMedlem
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = null!;
|
||||
public string Name { get; set; }
|
||||
public int Age { get; set; }
|
||||
public Patrulje Patrulje { get; set; } = null!;
|
||||
public Patrulje Patrulje { get; set; }
|
||||
public DateTime? DateCreated { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
public int Id { get; set; }
|
||||
public int Points { get; set; }
|
||||
public int Turnout { get; set; }
|
||||
public Patrulje Patrulje { get; set; } = null!;
|
||||
public Post Poster { get; set; } = null!;
|
||||
public Patrulje Patrulje { get; set; }
|
||||
public Post Poster { get; set; }
|
||||
public DateTime? DateCreated { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
public class Post
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = null!;
|
||||
public string Location { get; set; } = null!;
|
||||
public string Description { get; set; } = null!;
|
||||
public string Name { get; set; }
|
||||
public string Location { get; set; }
|
||||
public string Description { get; set; }
|
||||
public DateTime? DateCreated { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
ViewData["Title"] = "Opret patrulje";
|
||||
}
|
||||
|
||||
<h1>Create Patrulje</h1>
|
||||
<h1>Opret Patrulje</h1>
|
||||
|
||||
<div>
|
||||
<form asp-action="Create">
|
||||
@@ -13,6 +13,6 @@
|
||||
<input asp-for="Name" class="form-control" autocomplete="off"/>
|
||||
<span asp-validation-for="Name" class="text-danger"></span>
|
||||
</div>
|
||||
<input type="submit" class="btn btn-primary" />
|
||||
<input type="submit" class="btn btn-primary" value="Opret"/>
|
||||
</form>
|
||||
</div>
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<Nullable>disable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>f4aae456-b78c-4976-9472-dd315dc4a61f</UserSecretsId>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
|
||||
Reference in New Issue
Block a user