Change project to 3-Layer structure

This commit is contained in:
Tech Garage 2023-06-02 15:26:29 +03:30
parent 2f900a5036
commit 2d67540e13
1365 changed files with 760 additions and 618 deletions

View 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; }
}
}