using PrivaPub.ClientModels.Resources; using System.ComponentModel.DataAnnotations; using System.Security.AccessControl; using System.Text.Json.Serialization; using System.Xml.Linq; namespace PrivaPub.ClientModels.User.Avatar { [JsonSerializable(typeof(InsertAvatarForm))] public class InsertAvatarForm { [JsonIgnore] public string RootId { get; set; } [Required(ErrorMessageResourceName = "Required", ErrorMessageResourceType = typeof(ErrorsResource)), StringLength(Constants.MaxAvatarNameLength, ErrorMessageResourceName = "StringLength", ErrorMessageResourceType = typeof(ErrorsResource)), Display(Name = nameof(Name), ResourceType = typeof(FieldsNameResource))] public string Name { get; set; }//name [Required(ErrorMessageResourceName = "Required", ErrorMessageResourceType = typeof(ErrorsResource)), StringLength(Constants.MaxAvatarNameLength, ErrorMessageResourceName = "StringLength", ErrorMessageResourceType = typeof(ErrorsResource)), Display(Name = nameof(UserName), ResourceType = typeof(FieldsNameResource))] public string UserName { get; set; }//preferredUsername [Required(ErrorMessageResourceName = "Required", ErrorMessageResourceType = typeof(ErrorsResource)), StringLength(Constants.MaxAvatarBiographyLength, ErrorMessageResourceName = "StringLength", ErrorMessageResourceType = typeof(ErrorsResource)), Display(Name = nameof(Biography), ResourceType = typeof(FieldsNameResource))] public string Biography { get; set; }//summary public ViewAvatarSettings Settings { get; set; } = new(); public Dictionary Fields { get; set; } = new(); public string PersonalNote { get; set; } } }