mirror of
https://github.com/C9Glax/tranga.git
synced 2025-05-21 13:43:01 +02:00
22 lines
604 B
C#
22 lines
604 B
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace API.Schema;
|
|
|
|
public class LocalLibrary(string basePath, string libraryName)
|
|
{
|
|
[StringLength(64)]
|
|
[Required]
|
|
public string LocalLibraryId { get; init; } = TokenGen.CreateToken(typeof(LocalLibrary), basePath);
|
|
[StringLength(256)]
|
|
[Required]
|
|
public string BasePath { get; internal set; } = basePath;
|
|
|
|
[StringLength(512)]
|
|
[Required]
|
|
public string LibraryName { get; internal set; } = libraryName;
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"{LocalLibraryId} {LibraryName} - {BasePath}";
|
|
}
|
|
} |