mirror of
https://github.com/C9Glax/tranga.git
synced 2025-09-10 11:58:19 +02:00
Add key length annotation to Identifiable
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace API.Schema;
|
||||
@@ -15,6 +16,8 @@ public abstract class Identifiable
|
||||
this.Key = key;
|
||||
}
|
||||
|
||||
[Required]
|
||||
[StringLength(TokenGen.MaximumLength, MinimumLength = TokenGen.MinimumLength)]
|
||||
public string Key { get; init; }
|
||||
|
||||
public override string ToString() => Key;
|
||||
|
Reference in New Issue
Block a user