Tenant.cs 899 B

12345678910111213141516171819202122232425
  1. using Microsoft.EntityFrameworkCore;
  2. using Quadarax.Application.QLiberace.Base.Entities.Interfaces;
  3. using Quadarax.Application.QLiberace.Common.Entities.Base;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.ComponentModel.DataAnnotations.Schema;
  6. namespace Quadarax.Application.QLiberace.Base.Entities
  7. {
  8. [Table(Constants.Modules.Base.TblTenant,Schema = Constants.Modules.Base.Schema)]
  9. [Index("Code", Name="IDX_TENANT_CODE", IsUnique = true )]
  10. public class Tenant : QlbrcEntityTrackedWithId, IStructTenant
  11. {
  12. [MaxLength(20)]
  13. [Required(AllowEmptyStrings =false)]
  14. public string Code { get; set; } = null!;
  15. [MaxLength(200)]
  16. [Required(AllowEmptyStrings =false)]
  17. public string Name { get; set; } = null!;
  18. public DateTime? LastAccess { get; set; }
  19. [Required]
  20. public bool IsLocked { get; set; }
  21. }
  22. }