32 lines
1.4 KiB
C#
32 lines
1.4 KiB
C#
|
using PrivaPub.ClientModels.Resources;
|
|||
|
|
|||
|
using System.ComponentModel.DataAnnotations;
|
|||
|
using System.Text.Json.Serialization;
|
|||
|
|
|||
|
namespace PrivaPub.ClientModels.User.Avatar
|
|||
|
{
|
|||
|
[JsonSerializable(typeof(UpdateAvatarForm))]
|
|||
|
public class UpdateAvatarForm
|
|||
|
{
|
|||
|
[JsonIgnore]
|
|||
|
public string RootId { get; set; }
|
|||
|
[Required(ErrorMessageResourceName = "Required", ErrorMessageResourceType = typeof(ErrorsResource)),
|
|||
|
Display(Name = nameof(AvatarId), ResourceType = typeof(FieldsNameResource))]
|
|||
|
public string AvatarId { 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.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<string, string> Fields { get; set; } = new();
|
|||
|
public string PersonalNote { get; set; }
|
|||
|
}
|
|||
|
}
|