ApplicationUser.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // ======================================
  2. // Author: Ebenezer Monney
  3. // Email: info@ebenmonney.com
  4. // Copyright (c) 2017 www.ebenmonney.com
  5. //
  6. // ==> Gun4Hire: contact@ebenmonney.com
  7. // ======================================
  8. using System;
  9. using System.Collections.Generic;
  10. using System.Linq;
  11. using System.Text;
  12. using System.Threading.Tasks;
  13. using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
  14. namespace DAL.Models
  15. {
  16. public class ApplicationUser : IdentityUser
  17. {
  18. public virtual string FriendlyName
  19. {
  20. get
  21. {
  22. string friendlyName = string.IsNullOrWhiteSpace(FullName) ? UserName : FullName;
  23. if (!string.IsNullOrWhiteSpace(JobTitle))
  24. friendlyName = JobTitle + " " + friendlyName;
  25. return friendlyName;
  26. }
  27. }
  28. public string JobTitle { get; set; }
  29. public string FullName { get; set; }
  30. public string Configuration { get; set; }
  31. public bool IsEnabled { get; set; }
  32. public bool IsLockedOut => this.LockoutEnabled && this.LockoutEnd >= DateTimeOffset.UtcNow;
  33. public ICollection<Order> Orders { get; set; }
  34. }
  35. }