mirror of
https://github.com/C9Glax/tranga.git
synced 2025-09-10 20:08:19 +02:00
Descriptions for Records and DTOs
This commit is contained in:
@@ -1,14 +1,21 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace API.Controllers.DTOs;
|
||||
|
||||
public sealed record FileLibrary(string Key, string BasePath, string LibraryName) : Identifiable(Key)
|
||||
{
|
||||
[StringLength(256)]
|
||||
/// <summary>
|
||||
/// The directory Path of the library
|
||||
/// </summary>
|
||||
[Required]
|
||||
[Description("The directory Path of the library")]
|
||||
public string BasePath { get; internal set; } = BasePath;
|
||||
|
||||
[StringLength(512)]
|
||||
/// <summary>
|
||||
/// The Name of the library
|
||||
/// </summary>
|
||||
[Required]
|
||||
[Description("The Name of the library")]
|
||||
public string LibraryName { get; internal set; } = LibraryName;
|
||||
}
|
@@ -1,3 +1,4 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using API.Schema.LibraryContext.LibraryConnectors;
|
||||
|
||||
@@ -5,11 +6,18 @@ namespace API.Controllers.DTOs;
|
||||
|
||||
public record LibraryConnector(string Key, string BaseUrl, LibraryType Type) : Identifiable(Key)
|
||||
{
|
||||
[StringLength(256)]
|
||||
/// <summary>
|
||||
/// The Url of the Library instance
|
||||
/// </summary>
|
||||
[Required]
|
||||
[Url]
|
||||
public string BaseUrl {get; init;} = BaseUrl;
|
||||
[Description("The Url of the Library instance")]
|
||||
public string BaseUrl { get; init;} = BaseUrl;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="LibraryType"/>
|
||||
/// </summary>
|
||||
[Required]
|
||||
[Description("The Library Type")]
|
||||
public LibraryType Type { get; init; } = Type;
|
||||
}
|
Reference in New Issue
Block a user