v1.0 release

This commit is contained in:
Cameron
2024-08-27 03:29:38 -05:00
parent a4403ce17b
commit ef7c3f9dbd
38 changed files with 1172 additions and 73 deletions

28
Entities/UserType.cs Normal file
View File

@@ -0,0 +1,28 @@
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace ComiServ.Entities
{
[JsonConverter(typeof(JsonStringEnumConverter))]
public enum UserTypeEnum
{
//important that this is 0 as a safety precaution,
//in case it's accidentally left as default
Invalid = 0,
//can create accounts
Administrator = 1,
//has basic access
User = 2,
//authenticates but does not give access
Restricted = 3,
//refuses to authenticate but maintains records
Disabled = 4,
}
public class UserType
{
public UserTypeEnum Id { get; set; }
[MaxLength(26)]
public string Name { get; set; }
public ICollection<User> Users { get; set; }
}
}