using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Qusion.WebApp.Areas.Qusion.Models.Account
{
    [Table("qusion_User")]
    public class UserModel
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int UserID { get; set; }

        public Guid ID { get; set; }

        public string UserName { get; set; }

        /// <summary>
        ///   Gets or sets user first name
        /// </summary>
        public virtual string FirstName { get; set; }

        /// <summary>
        ///   Gets or sets users last name
        /// </summary>
        public virtual string LastName { get; set; }

        /// <summary>
        ///   Gets or sets the name of the user that created this entity.
        /// </summary>
        public virtual string CreatedBy { get; set; }

        /// <summary>
        ///   Gets or sets the date and time this entity was created.
        /// </summary>
        public virtual DateTime CreatedOn { get; set; }

        /// <summary>
        ///   Gets or sets the name of the user that updated this entity.
        /// </summary>
        public virtual string UpdatedBy { get; set; }

        /// <summary>
        ///   Gets or sets the date and time this entity was last updated.
        /// </summary>
        public virtual DateTime UpdatedOn { get; set; }

        /// <summary>
        ///   Get full name of user.
        /// </summary>
        public virtual string FullName
        {
            get { return String.Format("{0} {1}", FirstName, LastName); }
        }

        /// <summary>
        /// Gets or sets user avatar id.
        /// </summary>
        public virtual Guid? AvatarID { get; set; }
    }
}