IwbTenant.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using Abp.Domain.Entities.Auditing;
  2. using IwbZero.Authorization.Base.Users;
  3. namespace IwbZero.MultiTenancy
  4. {
  5. /// <summary>
  6. /// Represents a Tenant of the application.
  7. /// </summary>
  8. public abstract class IwbTenant<TUser> : TenantBase, IFullAudited<TUser>
  9. where TUser : UserBase
  10. {
  11. ///// <summary>
  12. ///// Current <see cref="Edition"/> of the Tenant.
  13. ///// </summary>
  14. //public virtual Edition Edition { get; set; }
  15. //public virtual int? EditionId { get; set; }
  16. /// <summary>
  17. /// Reference to the creator user of this entity.
  18. /// </summary>
  19. public virtual TUser CreatorUser { get; set; }
  20. /// <summary>
  21. /// Reference to the last modifier user of this entity.
  22. /// </summary>
  23. public virtual TUser LastModifierUser { get; set; }
  24. /// <summary>
  25. /// Reference to the deleter user of this entity.
  26. /// </summary>
  27. public virtual TUser DeleterUser { get; set; }
  28. /// <summary>
  29. /// Creates a new tenant.
  30. /// </summary>
  31. protected IwbTenant()
  32. {
  33. IsActive = true;
  34. }
  35. /// <summary>
  36. /// Creates a new tenant.
  37. /// </summary>
  38. /// <param name="tenancyName">UNIQUE name of this Tenant</param>
  39. /// <param name="name">Display name of the Tenant</param>
  40. protected IwbTenant(string tenancyName, string name)
  41. : this()
  42. {
  43. TenancyName = tenancyName;
  44. Name = name;
  45. }
  46. }
  47. }