1
0
mirror of https://github.com/C9Glax/tranga.git synced 2025-07-05 10:24:17 +02:00

Notification Connector Methods

This commit is contained in:
2024-12-16 17:42:16 +01:00
parent 84833acdeb
commit 6737be4a20
9 changed files with 146 additions and 323 deletions

@ -1,5 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
namespace API.Schema.NotificationConnectors;
@ -8,6 +10,11 @@ public abstract class NotificationConnector(string notificationConnectorId, Noti
{
[MaxLength(64)]
public string NotificationConnectorId { get; } = notificationConnectorId;
public NotificationConnectorType NotificationConnectorType { get; init; } = notificationConnectorType;
[JsonIgnore]
[NotMapped]
protected readonly HttpClient _client = new();
protected abstract void SendNotificationInternal(string title, string notificationText);
}