LocalPeer.cs 693 B

12345678910111213141516171819202122232425262728
  1. using System.ComponentModel.DataAnnotations;
  2. using System.ComponentModel.DataAnnotations.Schema;
  3. using Microsoft.EntityFrameworkCore;
  4. namespace PCC2.Data.Entity;
  5. [Index(nameof(PublicKeyHash), IsUnique = true)]
  6. public class LocalPeer
  7. {
  8. [Key]
  9. [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  10. public int Id { get; set; }
  11. public int DisplayOrder { get; set; }
  12. [Required]
  13. [MaxLength(128)]
  14. [Column(TypeName = "VARCHAR(128)")]
  15. public string? DisplayName { get; set; }
  16. [Required]
  17. public byte[]? PublicKeyHash { get; set; }
  18. [Required]
  19. public byte[]? PrivateKey { get; set; }
  20. public List<RemotePeer> RemotePeers { get; set; } = new();
  21. }