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

46 lines
1.7 KiB
C#
Raw Normal View History

using System.ComponentModel.DataAnnotations;
using LANCommander.SDK.Enums;
2023-12-11 17:29:06 -06:00
using System.ComponentModel.DataAnnotations.Schema;
2023-08-14 21:28:18 -05:00
using System.Text.Json.Serialization;
using LANCommander.Server.Settings.Enums;
2023-08-14 21:28:18 -05:00
2024-08-04 18:44:33 -05:00
namespace LANCommander.Server.Data.Models
{
public class Server : BaseModel
{
public string Name { get; set; } = "";
public ServerEngine Engine { get; set; } = ServerEngine.Local;
public string Path { get; set; } = "";
public string Arguments { get; set; } = "";
public string WorkingDirectory { get; set; } = "";
public string OnStartScriptPath { get; set; } = "";
public string OnStopScriptPath { get; set; } = "";
public Guid? DockerHostId { get; set; }
[MaxLength(64)]
public string ContainerId { get; set; } = "";
public string Host { get; set; } = "";
public int Port { get; set; } = 0;
public bool UseShellExecute { get; set; }
public ProcessTerminationMethod ProcessTerminationMethod { get; set; }
public bool Autostart { get; set; }
2024-08-12 00:15:16 -05:00
public ServerAutostartMethod AutostartMethod { get; set; }
public int AutostartDelay { get; set; }
2023-08-14 21:28:18 -05:00
public Guid? GameId { get; set; }
[JsonIgnore]
[ForeignKey(nameof(GameId))]
[InverseProperty("Servers")]
2024-11-27 01:51:47 -06:00
public Game? Game { get; set; }
2023-08-15 20:15:53 -05:00
2024-11-27 01:51:47 -06:00
public ICollection<ServerConsole>? ServerConsoles { get; set; }
public ICollection<ServerHttpPath>? HttpPaths { get; set; }
public ICollection<Script>? Scripts { get; set; }
2025-02-09 14:10:06 -06:00
public ICollection<Action>? Actions { get; set; }
2024-11-27 01:51:47 -06:00
public ICollection<Page>? Pages { get; set; }
}
}