mirror of
https://github.com/techgarage-ir/MTWireGuard.git
synced 2025-08-31 15:19:28 +02:00
Change project to 3-Layer structure
This commit is contained in:
parent
2f900a5036
commit
2d67540e13
1365 changed files with 760 additions and 618 deletions
68
Application/Models/Mikrotik/WGPeer.cs
Normal file
68
Application/Models/Mikrotik/WGPeer.cs
Normal file
|
@ -0,0 +1,68 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace MTWireGuard.Application.Models.Mikrotik
|
||||
{
|
||||
[PrimaryKey("Id")]
|
||||
[Index("PrivateKey", IsUnique = true)]
|
||||
[Index("PublicKey", IsUnique = true)]
|
||||
public class WGPeerDBModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string PrivateKey { get; set; }
|
||||
public string PublicKey { get; set; }
|
||||
}
|
||||
|
||||
public class WGPeerViewModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Address { get; set; }
|
||||
public string CurrentAddress { get; set; }
|
||||
public bool IsEnabled { get; set; }
|
||||
public string Interface { get; set; }
|
||||
public string PrivateKey { get; set; }
|
||||
public string PublicKey { get; set; }
|
||||
public string Download { get; set; }
|
||||
public string Upload { get; set; }
|
||||
public long DownloadBytes { get; set; }
|
||||
public long UploadBytes { get; set; }
|
||||
public bool IsDifferent { get; set; }
|
||||
}
|
||||
|
||||
public class UserCreateModel
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string PrivateKey { get; set; }
|
||||
public string AllowedAddress { get; set; }
|
||||
public bool Disabled { get; set; }
|
||||
public string Interface { get; set; }
|
||||
public string EndpointAddress { get; set; }
|
||||
public string EndpointPort { get; set; }
|
||||
public string PublicKey { get; set; }
|
||||
public string PresharedKey { get; set; }
|
||||
public string PersistentKeepalive { get; set; }
|
||||
}
|
||||
|
||||
public class UserSyncModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string PrivateKey { get; set; }
|
||||
public string PublicKey { get; set; }
|
||||
}
|
||||
|
||||
public class UserUpdateModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string AllowedAddress { get; set; }
|
||||
public string Interface { get; set; }
|
||||
public string EndpointAddress { get; set; }
|
||||
public ushort EndpointPort { get; set; }
|
||||
public string PublicKey { get; set; }
|
||||
public string PrivateKey { get; set; }
|
||||
public string PresharedKey { get; set; }
|
||||
public int PersistentKeepalive { get; set; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue