2024-08-12 00:15:16 -05:00
|
|
|
|
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;
|
|
|
|
|
|
|
2024-08-04 18:44:33 -05:00
|
|
|
|
namespace LANCommander.Server.Data.Models
|
2023-03-18 00:44:31 -05:00
|
|
|
|
{
|
|
|
|
|
|
public class Server : BaseModel
|
|
|
|
|
|
{
|
2023-04-13 17:43:26 -05:00
|
|
|
|
public string Name { get; set; } = "";
|
|
|
|
|
|
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; } = "";
|
2023-03-18 00:44:31 -05:00
|
|
|
|
|
2024-01-18 19:36:20 -06:00
|
|
|
|
public string Host { get; set; } = "";
|
|
|
|
|
|
public int Port { get; set; } = 0;
|
|
|
|
|
|
|
2023-08-11 15:03:30 -05:00
|
|
|
|
public bool UseShellExecute { get; set; }
|
2024-06-19 18:18:51 -05:00
|
|
|
|
public ProcessTerminationMethod ProcessTerminationMethod { get; set; }
|
2023-03-18 00:44:31 -05:00
|
|
|
|
public bool Autostart { get; set; }
|
2024-08-12 00:15:16 -05:00
|
|
|
|
public ServerAutostartMethod AutostartMethod { get; set; }
|
2023-08-11 15:03:30 -05:00
|
|
|
|
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; }
|
|
|
|
|
|
public ICollection<Action>? Actions { get; set; } = new List<Action>();
|
|
|
|
|
|
public ICollection<Page>? Pages { get; set; }
|
2023-03-18 00:44:31 -05:00
|
|
|
|
}
|
|
|
|
|
|
}
|