Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
filipbekic01 committed Sep 22, 2024
1 parent aaff662 commit 043f2ae
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 33 deletions.
14 changes: 7 additions & 7 deletions backend/ResQueue/ResQueue/Dtos/Broker/BrokerInvitationDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
4 changes: 2 additions & 2 deletions backend/ResQueue/ResQueue/Dtos/ExchangeDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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!;
}
6 changes: 3 additions & 3 deletions backend/ResQueue/ResQueue/Dtos/MessageDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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!;

/// <summary>
/// "json" or "base64"
/// </summary>
public string BodyEncoding { get; set; }
public string BodyEncoding { get; set; } = null!;

public RabbitmqMessageMetadataDto? RabbitmqMetadata { get; set; }
public bool IsReviewed { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions backend/ResQueue/ResQueue/Dtos/QueueDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
8 changes: 4 additions & 4 deletions backend/ResQueue/ResQueue/Dtos/UpsertMessageDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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!;

/// <summary>
/// "json" or "base64"
/// </summary>
public string BodyEncoding { get; set; }
public string BodyEncoding { get; set; } = null!;

public RabbitmqUpsertMessageMetadataDto? RabbitmqMetadata { get; set; }
}
10 changes: 5 additions & 5 deletions backend/ResQueue/ResQueue/Models/BrokerInvitation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion backend/ResQueue/ResQueue/Models/Exchange.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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!;
}
2 changes: 1 addition & 1 deletion backend/ResQueue/ResQueue/Models/Queue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
2 changes: 1 addition & 1 deletion backend/ResQueue/ResQueue/PaginatedResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace ResQueue;

public class PaginatedResult<T>
{
public List<T> Items { get; set; }
public List<T> Items { get; set; } = null!;
public int PageIndex { get; set; }
public int TotalPages { get; set; }
public int PageSize { get; set; }
Expand Down
12 changes: 6 additions & 6 deletions backend/ResQueue/ResQueue/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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!;
}
2 changes: 1 addition & 1 deletion backend/ResQueue/ResQueue/UserAvatarGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/// <summary>
/// Generates an avatar with a random color from the predefined array and a random pattern.
Expand Down

0 comments on commit 043f2ae

Please sign in to comment.