mirror of
https://github.com/C9Glax/tranga.git
synced 2025-06-18 01:07:53 +02:00
Add API
This commit is contained in:
18
API/Schema/LibraryConnectors/LibraryConnector.cs
Normal file
18
API/Schema/LibraryConnectors/LibraryConnector.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace API.Schema.LibraryConnectors;
|
||||
|
||||
[PrimaryKey("LibraryConnectorId")]
|
||||
public abstract class LibraryConnector(string libraryConnectorId, LibraryType libraryType, string baseUrl, string auth) : APISerializable
|
||||
{
|
||||
[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();
|
||||
}
|
Reference in New Issue
Block a user