New server models
This commit is contained in:
@@ -5,7 +5,7 @@ using System.Text;
|
||||
|
||||
namespace WinWARP.Core.Models.Entities;
|
||||
|
||||
public class Server
|
||||
public abstract class Server
|
||||
{
|
||||
[Key]
|
||||
public int Id
|
||||
@@ -13,10 +13,15 @@ public class Server
|
||||
get; set;
|
||||
}
|
||||
|
||||
|
||||
public int SubscriptionId
|
||||
[Required]
|
||||
public string Name
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
[StringLength(100)]
|
||||
public string CustomName
|
||||
{
|
||||
get; set;
|
||||
} = string.Empty;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text;
|
||||
|
||||
namespace WinWARP.Core.Models.Entities;
|
||||
|
||||
public class StandaloneServer : Server
|
||||
{
|
||||
[Required]
|
||||
public string FilePath
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
@@ -53,4 +53,10 @@ public class Subscription
|
||||
{
|
||||
get; set;
|
||||
} = string.Empty;
|
||||
|
||||
|
||||
public List<SubscriptionServer> Servers
|
||||
{
|
||||
get; set;
|
||||
} = [];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WinWARP.Core.Models.Entities;
|
||||
|
||||
public class SubscriptionServer : Server
|
||||
{
|
||||
public Subscription Subscription
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string Region
|
||||
{
|
||||
get; set;
|
||||
} = string.Empty;
|
||||
}
|
||||
Reference in New Issue
Block a user