Phase 0 WP-0.2–0.9: Implement Commons (types, entities, interfaces, messages, protocol, tests)

- WP-0.2: Namespace/folder skeleton (26 directories)
- WP-0.3: Shared data types (6 enums, RetryPolicy, Result<T>)
- WP-0.4: 24 domain entity POCOs across 10 domain areas
- WP-0.5: 7 repository interfaces with full CRUD signatures
- WP-0.6: IAuditService cross-cutting interface
- WP-0.7: 26 message contract records across 8 concern areas
- WP-0.8: IDataConnection protocol abstraction with batch ops
- WP-0.9: 8 architectural constraint enforcement tests
All 40 tests pass, zero warnings.
This commit is contained in:
Joseph Doherty
2026-03-16 18:48:24 -04:00
parent fed5f5a82c
commit 22e1eba58a
78 changed files with 1530 additions and 16 deletions

View File

@@ -0,0 +1,13 @@
namespace ScadaLink.Commons.Entities.Notifications;
public class NotificationList
{
public int Id { get; set; }
public string Name { get; set; }
public ICollection<NotificationRecipient> Recipients { get; set; } = new List<NotificationRecipient>();
public NotificationList(string name)
{
Name = name ?? throw new ArgumentNullException(nameof(name));
}
}

View File

@@ -0,0 +1,15 @@
namespace ScadaLink.Commons.Entities.Notifications;
public class NotificationRecipient
{
public int Id { get; set; }
public int NotificationListId { get; set; }
public string Name { get; set; }
public string EmailAddress { get; set; }
public NotificationRecipient(string name, string emailAddress)
{
Name = name ?? throw new ArgumentNullException(nameof(name));
EmailAddress = emailAddress ?? throw new ArgumentNullException(nameof(emailAddress));
}
}

View File

@@ -0,0 +1,23 @@
namespace ScadaLink.Commons.Entities.Notifications;
public class SmtpConfiguration
{
public int Id { get; set; }
public string Host { get; set; }
public int Port { get; set; }
public string AuthType { get; set; }
public string? Credentials { get; set; }
public string? TlsMode { get; set; }
public string FromAddress { get; set; }
public int ConnectionTimeoutSeconds { get; set; }
public int MaxConcurrentConnections { get; set; }
public int MaxRetries { get; set; }
public TimeSpan RetryDelay { get; set; }
public SmtpConfiguration(string host, string authType, string fromAddress)
{
Host = host ?? throw new ArgumentNullException(nameof(host));
AuthType = authType ?? throw new ArgumentNullException(nameof(authType));
FromAddress = fromAddress ?? throw new ArgumentNullException(nameof(fromAddress));
}
}