LANCommander/LANCommander.Server.Data/Models/Action.cs

29 lines
850 B
C#
Raw Normal View History

2023-01-08 21:43:01 -06:00
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
2023-01-08 21:43:01 -06:00
2024-08-04 18:44:33 -05:00
namespace LANCommander.Server.Data.Models
2023-01-08 21:43:01 -06:00
{
[Table("Actions")]
public class Action : BaseModel
{
public string Name { get; set; }
public string? Arguments { get; set; }
public string? Path { get; set; }
public string? WorkingDirectory { get; set; }
2023-01-08 21:43:01 -06:00
public bool PrimaryAction { get; set; }
public int SortOrder { get; set; }
2023-01-08 21:43:01 -06:00
public Guid? GameId { get; set; }
[JsonIgnore]
[ForeignKey(nameof(GameId))]
[InverseProperty("Actions")]
2024-11-27 01:51:47 -06:00
public Game? Game { get; set; }
public Guid? ServerId { get; set; }
[JsonIgnore]
[ForeignKey(nameof(ServerId))]
[InverseProperty("Actions")]
2024-11-27 01:51:47 -06:00
public Server? Server { get; set; }
2023-01-08 21:43:01 -06:00
}
}