2023-01-08 21:43:01 -06:00
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
2023-01-12 01:25:32 -06:00
|
|
|
|
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; }
|
2023-01-12 20:03:04 -06:00
|
|
|
|
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; }
|
2023-01-16 23:45:46 -06:00
|
|
|
|
public int SortOrder { get; set; }
|
2023-01-08 21:43:01 -06:00
|
|
|
|
|
2024-01-18 01:27:03 -06:00
|
|
|
|
public Guid? GameId { get; set; }
|
2023-01-12 01:25:32 -06:00
|
|
|
|
[JsonIgnore]
|
2023-01-14 15:07:45 -06:00
|
|
|
|
[ForeignKey(nameof(GameId))]
|
|
|
|
|
|
[InverseProperty("Actions")]
|
2024-11-27 01:51:47 -06:00
|
|
|
|
public Game? Game { get; set; }
|
2024-01-18 01:27:03 -06:00
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
}
|