2024-12-14 21:53:29 +01:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
|
|
|
|
namespace API.Schema.LibraryConnectors;
|
|
|
|
|
|
|
|
|
|
[PrimaryKey("LibraryConnectorId")]
|
2024-12-16 18:55:52 +01:00
|
|
|
|
public abstract class LibraryConnector(string libraryConnectorId, LibraryType libraryType, string baseUrl, string auth)
|
2024-12-14 21:53:29 +01:00
|
|
|
|
{
|
|
|
|
|
[MaxLength(64)]
|
|
|
|
|
public string LibraryConnectorId { get; } = libraryConnectorId;
|
|
|
|
|
|
|
|
|
|
public LibraryType LibraryType { get; init; } = libraryType;
|
|
|
|
|
public string BaseUrl { get; init; } = baseUrl;
|
|
|
|
|
public string Auth { get; init; } = auth;
|
|
|
|
|
|
|
|
|
|
protected abstract void UpdateLibraryInternal();
|
|
|
|
|
internal abstract bool Test();
|
|
|
|
|
}
|