2018-11-06 15:55:31 -06:00
|
|
|
|
using Mapster;
|
|
|
|
|
using System;
|
2018-12-16 17:37:19 -06:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2018-11-05 20:41:51 -06:00
|
|
|
|
|
|
|
|
|
namespace Roadie.Library.Models.Users
|
|
|
|
|
{
|
|
|
|
|
[Serializable]
|
|
|
|
|
public class User
|
2018-12-16 17:37:19 -06:00
|
|
|
|
{
|
2018-11-11 18:28:37 -06:00
|
|
|
|
public const string ActionKeyUserRated = "__userrated__";
|
|
|
|
|
|
2018-12-16 17:37:19 -06:00
|
|
|
|
[MaxLength(100)]
|
|
|
|
|
public string ApiToken { get; set; }
|
|
|
|
|
|
|
|
|
|
public Image Avatar { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Posted image from a client of selected new base64 encoded avatar for the user
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string AvatarData { get; set; }
|
|
|
|
|
|
|
|
|
|
public bool DoUseHtmlPlayer { get; set; }
|
|
|
|
|
|
|
|
|
|
[Required]
|
|
|
|
|
[MaxLength(100)]
|
|
|
|
|
[DataType(DataType.EmailAddress)]
|
|
|
|
|
public string Email { get; set; }
|
|
|
|
|
|
|
|
|
|
[MaxLength(500)]
|
|
|
|
|
public string FtpDirectory { get; set; }
|
|
|
|
|
|
|
|
|
|
[MaxLength(500)]
|
|
|
|
|
public string FtpPassword { get; set; }
|
|
|
|
|
|
|
|
|
|
[MaxLength(250)]
|
|
|
|
|
public string FtpUrl { get; set; }
|
|
|
|
|
|
|
|
|
|
[MaxLength(50)]
|
|
|
|
|
public string FtpUsername { get; set; }
|
|
|
|
|
|
|
|
|
|
[Required]
|
|
|
|
|
[MaxLength(100)]
|
|
|
|
|
public string ConcurrencyStamp { get; set; }
|
|
|
|
|
|
|
|
|
|
public int? Id { get; set; }
|
2018-11-06 15:55:31 -06:00
|
|
|
|
public bool IsAdmin { get; set; }
|
2018-12-16 17:37:19 -06:00
|
|
|
|
public bool IsEditor { get; set; }
|
|
|
|
|
public bool IsPrivate { get; set; }
|
|
|
|
|
|
|
|
|
|
public short? PlayerTrackLimit { get; set; }
|
|
|
|
|
|
|
|
|
|
[MaxLength(65535)]
|
|
|
|
|
public string Profile { get; set; }
|
|
|
|
|
|
|
|
|
|
public short? RandomReleaseLimit { get; set; }
|
|
|
|
|
|
|
|
|
|
public short? RecentlyPlayedLimit { get; set; }
|
|
|
|
|
|
|
|
|
|
[StringLength(50)]
|
|
|
|
|
[Required]
|
|
|
|
|
public string Timeformat { get; set; }
|
|
|
|
|
|
|
|
|
|
[MaxLength(50)]
|
|
|
|
|
[Required]
|
|
|
|
|
public string Timezone { get; set; }
|
|
|
|
|
|
2018-11-06 15:55:31 -06:00
|
|
|
|
[AdaptMember("RoadieId")]
|
|
|
|
|
public Guid UserId { get; set; }
|
2018-12-16 17:37:19 -06:00
|
|
|
|
|
|
|
|
|
[Required]
|
|
|
|
|
[MaxLength(20)]
|
|
|
|
|
public string UserName { get; set; }
|
2018-11-06 15:55:31 -06:00
|
|
|
|
|
2018-11-11 14:45:44 -06:00
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
|
|
|
|
return $"Id [{ Id }], RoadieId [{ UserId }], UserName [{ UserName }]";
|
|
|
|
|
}
|
2018-11-05 20:41:51 -06:00
|
|
|
|
}
|
|
|
|
|
}
|