fixes for new polling setup

update database model for alias (nullable ip)
heartbeats now send ip to master server
This commit is contained in:
RaidMax
2018-11-25 20:00:36 -06:00
parent 9bdd7d1b8a
commit 5ac8a55c72
28 changed files with 1257 additions and 408 deletions

View File

@ -16,7 +16,7 @@ namespace SharedLibraryCore.Database.Models
[MaxLength(24)]
public string Name { get; set; }
[Required]
public int IPAddress { get; set; }
public int? IPAddress { get; set; }
[Required]
public DateTime DateAdded { get; set; }
}

View File

@ -44,14 +44,14 @@ namespace SharedLibraryCore.Database.Models
set { CurrentAlias.Name = value; }
}
[NotMapped]
public virtual int IPAddress
public virtual int? IPAddress
{
get { return CurrentAlias.IPAddress; }
set { CurrentAlias.IPAddress = value; }
}
[NotMapped]
public string IPAddressString => new System.Net.IPAddress(BitConverter.GetBytes(IPAddress)).ToString();
public string IPAddressString => IPAddress.ConvertIPtoString();
[NotMapped]
public virtual IDictionary<int, long> LinkedAccounts { get; set; }