diff --git a/backend/ResQueue/ResQueue/Dtos/Broker/BrokerInvitationDto.cs b/backend/ResQueue/ResQueue/Dtos/Broker/BrokerInvitationDto.cs
index b48a434..02398df 100644
--- a/backend/ResQueue/ResQueue/Dtos/Broker/BrokerInvitationDto.cs
+++ b/backend/ResQueue/ResQueue/Dtos/Broker/BrokerInvitationDto.cs
@@ -2,13 +2,13 @@ namespace ResQueue.Dtos.Broker;
public class BrokerInvitationDto
{
- public string Id { get; set; }
- public string BrokerId { get; set; }
- public string InviterId { get; set; }
- public string InviteeId { get; set; }
- public string InviterEmail { get; set; }
- public string Token { get; set; }
- public string BrokerName { get; set; }
+ public string Id { get; set; } = null!;
+ public string BrokerId { get; set; } = null!;
+ public string InviterId { get; set; } = null!;
+ public string InviteeId { get; set; } = null!;
+ public string InviterEmail { get; set; } = null!;
+ public string Token { get; set; } = null!;
+ public string BrokerName { get; set; } = null!;
public DateTime CreatedAt { get; set; }
public DateTime ExpiresAt { get; set; }
public bool IsAccepted { get; set; }
diff --git a/backend/ResQueue/ResQueue/Dtos/ExchangeDto.cs b/backend/ResQueue/ResQueue/Dtos/ExchangeDto.cs
index e9a3af2..9e18d7e 100644
--- a/backend/ResQueue/ResQueue/Dtos/ExchangeDto.cs
+++ b/backend/ResQueue/ResQueue/Dtos/ExchangeDto.cs
@@ -2,6 +2,6 @@ namespace ResQueue.Dtos;
public class ExchangeDto
{
- public string Id { get; set; }
- public string RawData { get; set; }
+ public string Id { get; set; } = null!;
+ public string RawData { get; set; } = null!;
}
\ No newline at end of file
diff --git a/backend/ResQueue/ResQueue/Dtos/MessageDto.cs b/backend/ResQueue/ResQueue/Dtos/MessageDto.cs
index 6dc5f96..79be25d 100644
--- a/backend/ResQueue/ResQueue/Dtos/MessageDto.cs
+++ b/backend/ResQueue/ResQueue/Dtos/MessageDto.cs
@@ -4,13 +4,13 @@ namespace ResQueue.Dtos;
public class MessageDto
{
- public string Id { get; set; }
- public JsonNode Body { get; set; }
+ public string Id { get; set; } = null!;
+ public JsonNode Body { get; set; } = null!;
///
/// "json" or "base64"
///
- public string BodyEncoding { get; set; }
+ public string BodyEncoding { get; set; } = null!;
public RabbitmqMessageMetadataDto? RabbitmqMetadata { get; set; }
public bool IsReviewed { get; set; }
diff --git a/backend/ResQueue/ResQueue/Dtos/QueueDto.cs b/backend/ResQueue/ResQueue/Dtos/QueueDto.cs
index ecde7c6..b34a1c8 100644
--- a/backend/ResQueue/ResQueue/Dtos/QueueDto.cs
+++ b/backend/ResQueue/ResQueue/Dtos/QueueDto.cs
@@ -2,8 +2,8 @@ namespace ResQueue.Dtos;
public class QueueDto
{
- public string Id { get; set; }
- public string RawData { get; set; }
+ public string Id { get; set; } = null!;
+ public string RawData { get; set; } = null!;
public long TotalMessages { get; set; }
public bool IsFavorite { get; set; }
public DateTime CreatedAt { get; set; }
diff --git a/backend/ResQueue/ResQueue/Dtos/UpsertMessageDto.cs b/backend/ResQueue/ResQueue/Dtos/UpsertMessageDto.cs
index 2f037f6..d2bc5a2 100644
--- a/backend/ResQueue/ResQueue/Dtos/UpsertMessageDto.cs
+++ b/backend/ResQueue/ResQueue/Dtos/UpsertMessageDto.cs
@@ -4,14 +4,14 @@ namespace ResQueue.Dtos;
public class UpsertMessageDto
{
- public string BrokerId { get; set; }
- public string QueueId { get; set; }
- public JsonNode Body { get; set; }
+ public string BrokerId { get; set; } = null!;
+ public string QueueId { get; set; } = null!;
+ public JsonNode Body { get; set; } = null!;
///
/// "json" or "base64"
///
- public string BodyEncoding { get; set; }
+ public string BodyEncoding { get; set; } = null!;
public RabbitmqUpsertMessageMetadataDto? RabbitmqMetadata { get; set; }
}
\ No newline at end of file
diff --git a/backend/ResQueue/ResQueue/Models/BrokerInvitation.cs b/backend/ResQueue/ResQueue/Models/BrokerInvitation.cs
index bda1b2b..be3ee52 100644
--- a/backend/ResQueue/ResQueue/Models/BrokerInvitation.cs
+++ b/backend/ResQueue/ResQueue/Models/BrokerInvitation.cs
@@ -7,11 +7,11 @@ public class BrokerInvitation
{
[BsonId] public ObjectId Id { get; set; }
public ObjectId BrokerId { get; set; }
- public ObjectId InviterId { get; set; } // User who invited
- public ObjectId InviteeId { get; set; } // User who was invited
- public string InviterEmail { get; set; }
- public string Token { get; set; }
- public string BrokerName { get; set; }
+ public ObjectId InviterId { get; set; }
+ public ObjectId InviteeId { get; set; }
+ public string InviterEmail { get; set; } = null!;
+ public string Token { get; set; } = null!;
+ public string BrokerName { get; set; } = null!;
public DateTime CreatedAt { get; set; }
public DateTime ExpiresAt { get; set; }
public bool IsAccepted { get; set; } = false;
diff --git a/backend/ResQueue/ResQueue/Models/Exchange.cs b/backend/ResQueue/ResQueue/Models/Exchange.cs
index de737e9..8ffaaa2 100644
--- a/backend/ResQueue/ResQueue/Models/Exchange.cs
+++ b/backend/ResQueue/ResQueue/Models/Exchange.cs
@@ -8,5 +8,5 @@ public class Exchange
[BsonId] public ObjectId Id { get; set; }
public ObjectId UserId { get; set; }
public ObjectId BrokerId { get; set; }
- public BsonDocument RawData { get; set; }
+ public BsonDocument RawData { get; set; } = null!;
}
\ No newline at end of file
diff --git a/backend/ResQueue/ResQueue/Models/Queue.cs b/backend/ResQueue/ResQueue/Models/Queue.cs
index 2ab26ab..b06331c 100644
--- a/backend/ResQueue/ResQueue/Models/Queue.cs
+++ b/backend/ResQueue/ResQueue/Models/Queue.cs
@@ -9,7 +9,7 @@ public class Queue
public ObjectId BrokerId { get; set; }
public int TotalMessages { get; set; }
public bool IsFavorite { get; set; }
- public BsonDocument RawData { get; set; }
+ public BsonDocument RawData { get; set; } = null!;
public DateTime CreatedAt { get; set; }
public long NextMessageOrder { get; set; }
}
\ No newline at end of file
diff --git a/backend/ResQueue/ResQueue/PaginatedResult.cs b/backend/ResQueue/ResQueue/PaginatedResult.cs
index 980d680..b8d04f7 100644
--- a/backend/ResQueue/ResQueue/PaginatedResult.cs
+++ b/backend/ResQueue/ResQueue/PaginatedResult.cs
@@ -2,7 +2,7 @@ namespace ResQueue;
public class PaginatedResult
{
- public List Items { get; set; }
+ public List Items { get; set; } = null!;
public int PageIndex { get; set; }
public int TotalPages { get; set; }
public int PageSize { get; set; }
diff --git a/backend/ResQueue/ResQueue/Settings.cs b/backend/ResQueue/ResQueue/Settings.cs
index 5ee10f8..a2ab3be 100644
--- a/backend/ResQueue/ResQueue/Settings.cs
+++ b/backend/ResQueue/ResQueue/Settings.cs
@@ -2,13 +2,13 @@ namespace ResQueue;
public class Settings
{
- public string SmtpHost { get; set; }
+ public string SmtpHost { get; set; } = null!;
public int SmtpPort { get; set; }
- public string SmtpUsername { get; set; }
- public string SmtpPassword { get; set; }
+ public string SmtpUsername { get; set; } = null!;
+ public string SmtpPassword { get; set; } = null!;
- public string MongoDBConnectionString { get; set; }
+ public string MongoDBConnectionString { get; set; } = null!;
- public string StripeSecret { get; set; }
- public string StripeSecretWebhook { get; set; }
+ public string StripeSecret { get; set; } = null!;
+ public string StripeSecretWebhook { get; set; } = null!;
}
\ No newline at end of file
diff --git a/backend/ResQueue/ResQueue/UserAvatarGenerator.cs b/backend/ResQueue/ResQueue/UserAvatarGenerator.cs
index b8ef8f7..81a1df0 100644
--- a/backend/ResQueue/ResQueue/UserAvatarGenerator.cs
+++ b/backend/ResQueue/ResQueue/UserAvatarGenerator.cs
@@ -33,7 +33,7 @@ public static class UserAvatarGenerator
// Thread-safe random number generator
private static readonly Random GlobalRandom = new Random();
[ThreadStatic]
- private static Random _localRandom;
+ private static Random? _localRandom;
///
/// Generates an avatar with a random color from the predefined array and a random pattern.