1234567891011121314151617181920212223242526272829 |
- using System.ComponentModel.DataAnnotations;
- using System.ComponentModel.DataAnnotations.Schema;
- using Microsoft.EntityFrameworkCore;
- namespace PCC2.Data.Entity;
- [Index(nameof(PublicKeyHash), IsUnique = true)]
- public class RemotePeer
- {
- [Key]
- [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; set; }
- public int LocalPeerId { get; set; }
- public LocalPeer? LocalPeer { get; set; }
- [Required][MaxLength(128)][Column(TypeName = "VARCHAR(128)")] public string? Name { get; set; }
- [Required][MaxLength(128)][Column(TypeName = "VARCHAR(128)")] public string? Host { get; set; }
- [Required]
- public int Port { get; set; }
- [Required]
- public byte[]? PublicKeyHash { get; set; }
- [Required]
- public byte[]? PublicKey { get; set; }
- }
|