using System.ComponentModel;
using MediaBrowser.Model.Configuration;
using ProtoBuf;
using System;
using System.Runtime.Serialization;
namespace MediaBrowser.Model.Dto
{
    /// 
    /// Class UserDto
    /// 
    [ProtoContract]
    public class UserDto : INotifyPropertyChanged, IItemDto
    {
        /// 
        /// Gets or sets the name.
        /// 
        /// The name.
        [ProtoMember(1)]
        public string Name { get; set; }
        /// 
        /// Gets or sets the id.
        /// 
        /// The id.
        [ProtoMember(2)]
        public Guid Id { get; set; }
        /// 
        /// Gets or sets the primary image tag.
        /// 
        /// The primary image tag.
        [ProtoMember(3)]
        public Guid? PrimaryImageTag { get; set; }
        /// 
        /// Gets or sets a value indicating whether this instance has password.
        /// 
        /// true if this instance has password; otherwise, false.
        [ProtoMember(4)]
        public bool HasPassword { get; set; }
        /// 
        /// Gets or sets the last login date.
        /// 
        /// The last login date.
        [ProtoMember(5)]
        public DateTime? LastLoginDate { get; set; }
        /// 
        /// Gets or sets the last activity date.
        /// 
        /// The last activity date.
        [ProtoMember(6)]
        public DateTime? LastActivityDate { get; set; }
        /// 
        /// Gets or sets the configuration.
        /// 
        /// The configuration.
        [ProtoMember(7)]
        public UserConfiguration Configuration { get; set; }
        /// 
        /// Gets or sets the primary image aspect ratio.
        /// 
        /// The primary image aspect ratio.
        [ProtoMember(8)]
        public double? PrimaryImageAspectRatio { get; set; }
        
        /// 
        /// Gets a value indicating whether this instance has primary image.
        /// 
        /// true if this instance has primary image; otherwise, false.
        [IgnoreDataMember]
        public bool HasPrimaryImage
        {
            get { return PrimaryImageTag.HasValue; }
        }
        public event PropertyChangedEventHandler PropertyChanged;
    }
}