LANCommander/LANCommander.Server.Data/Models/GameCustomField.cs

31 lines
671 B
C#
Raw Permalink Normal View History

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
namespace LANCommander.Server.Data.Models;
public class GameCustomField : BaseModel
{
[MaxLength(64)]
public string Name { get; set; }
[MaxLength(1024)]
public string Value { get; set; }
public Guid? GameId { get; set; }
[JsonIgnore]
[ForeignKey(nameof(GameId))]
[InverseProperty("CustomFields")]
public Game? Game { get; set; }
2025-03-29 20:10:35 -05:00
public GameCustomField()
{
}
public GameCustomField(string name, string value)
{
Name = name;
Value = value;
}
}