Initial commit, project structure and domain models
This commit is contained in:
0
src/api/MicCheck.Api/Webhooks/.gitkeep
Normal file
0
src/api/MicCheck.Api/Webhooks/.gitkeep
Normal file
15
src/api/MicCheck.Api/Webhooks/Webhook.cs
Normal file
15
src/api/MicCheck.Api/Webhooks/Webhook.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace MicCheck.Api.Webhooks;
|
||||
|
||||
public class Webhook
|
||||
{
|
||||
public int Id { get; init; }
|
||||
public required string Url { get; set; }
|
||||
public string? Secret { get; set; }
|
||||
public WebhookScope Scope { get; set; }
|
||||
public int? EnvironmentId { get; set; }
|
||||
public int? OrganizationId { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
public DateTimeOffset CreatedAt { get; init; }
|
||||
}
|
||||
|
||||
public enum WebhookScope { Environment, Organization }
|
||||
15
src/api/MicCheck.Api/Webhooks/WebhookDeliveryLog.cs
Normal file
15
src/api/MicCheck.Api/Webhooks/WebhookDeliveryLog.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace MicCheck.Api.Webhooks;
|
||||
|
||||
public class WebhookDeliveryLog
|
||||
{
|
||||
public int Id { get; init; }
|
||||
public int WebhookId { get; init; }
|
||||
public required string EventType { get; init; }
|
||||
public required string PayloadJson { get; init; }
|
||||
public int? ResponseStatusCode { get; set; }
|
||||
public string? ResponseBody { get; set; }
|
||||
public bool Success { get; set; }
|
||||
public string? ErrorMessage { get; set; }
|
||||
public DateTimeOffset AttemptedAt { get; init; }
|
||||
public TimeSpan Duration { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user