Added notes field to games

This commit is contained in:
Pat Hartl 2023-08-27 12:31:04 -05:00
parent 8286c1ea0c
commit c3d281a1e4
5 changed files with 1471 additions and 1 deletions

View file

@ -14,6 +14,8 @@ namespace LANCommander.Data.Models
[Display(Name = "Directory Name")]
public string? DirectoryName { get; set; }
public string? Description { get; set; }
public string? Notes { get; set; }
[Display(Name = "Released On")]
public DateTime? ReleasedOn { get; set; }

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,28 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LANCommander.Migrations
{
/// <inheritdoc />
public partial class AddGameNotes : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "Notes",
table: "Games",
type: "TEXT",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Notes",
table: "Games");
}
}
}

View file

@ -16,7 +16,7 @@ namespace LANCommander.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.9")
.HasAnnotation("ProductVersion", "7.0.10")
.HasAnnotation("Proxies:ChangeTracking", false)
.HasAnnotation("Proxies:CheckEquality", false)
.HasAnnotation("Proxies:LazyLoading", true);
@ -292,6 +292,9 @@ namespace LANCommander.Migrations
b.Property<string>("Icon")
.HasColumnType("TEXT");
b.Property<string>("Notes")
.HasColumnType("TEXT");
b.Property<DateTime?>("ReleasedOn")
.HasColumnType("TEXT");

View file

@ -72,6 +72,9 @@
<FormItem Label="Icon">
<InputArchiveFile @bind-Value="context.Icon" ArchiveId="@LatestArchiveId" AllowDirectories="true" />
</FormItem>
<FormItem Label="Notes">
<TextArea @bind-Value="@context.Notes" MaxLength=2000 ShowCount />
</FormItem>
<FormItem Label="Description">
<TextArea @bind-Value="@context.Description" MaxLength=500 ShowCount />
</FormItem>