diff --git a/Models/Dtos/CreateTenantDto.cs b/Models/Dtos/CreateTenantDto.cs new file mode 100644 index 0000000..610eb84 --- /dev/null +++ b/Models/Dtos/CreateTenantDto.cs @@ -0,0 +1,29 @@ +using System.ComponentModel.DataAnnotations; + +namespace Fengling.Console.Models.Dtos; + +public class CreateTenantDto +{ + [Required] + public string TenantId { get; set; } = string.Empty; + + [Required] + public string Name { get; set; } = string.Empty; + + [Required] + public string ContactName { get; set; } = string.Empty; + + [Required] + [EmailAddress] + public string ContactEmail { get; set; } = string.Empty; + + public string? ContactPhone { get; set; } + + public int? MaxUsers { get; set; } + + public string? Description { get; set; } + + public string Status { get; set; } = "active"; + + public DateTime? ExpiresAt { get; set; } +} diff --git a/Models/Dtos/TenantDto.cs b/Models/Dtos/TenantDto.cs new file mode 100644 index 0000000..2647e93 --- /dev/null +++ b/Models/Dtos/TenantDto.cs @@ -0,0 +1,17 @@ +namespace Fengling.Console.Models.Dtos; + +public class TenantDto +{ + public long Id { get; set; } + public string TenantId { get; set; } = ""; + public string Name { get; set; } = ""; + public string ContactName { get; set; } = ""; + public string ContactEmail { get; set; } = ""; + public string? ContactPhone { get; set; } + public int? MaxUsers { get; set; } + public int UserCount { get; set; } + public string Status { get; set; } = "active"; + public DateTime? ExpiresAt { get; set; } + public string? Description { get; set; } + public DateTime CreatedAt { get; set; } +} diff --git a/Models/Dtos/TenantSettingsDto.cs b/Models/Dtos/TenantSettingsDto.cs new file mode 100644 index 0000000..a8ab412 --- /dev/null +++ b/Models/Dtos/TenantSettingsDto.cs @@ -0,0 +1,11 @@ +namespace Fengling.Console.Models.Dtos; + +public class TenantSettingsDto +{ + public bool AllowRegistration { get; set; } + public string AllowedEmailDomains { get; set; } = string.Empty; + public long? DefaultRoleId { get; set; } + public List PasswordPolicy { get; set; } = new(); + public int MinPasswordLength { get; set; } = 8; + public int SessionTimeout { get; set; } = 120; +} diff --git a/Models/Dtos/UpdateTenantDto.cs b/Models/Dtos/UpdateTenantDto.cs new file mode 100644 index 0000000..6c806e6 --- /dev/null +++ b/Models/Dtos/UpdateTenantDto.cs @@ -0,0 +1,26 @@ +using System.ComponentModel.DataAnnotations; + +namespace Fengling.Console.Models.Dtos; + +public class UpdateTenantDto +{ + [Required] + public string Name { get; set; } = string.Empty; + + [Required] + public string ContactName { get; set; } = string.Empty; + + [Required] + [EmailAddress] + public string ContactEmail { get; set; } = string.Empty; + + public string? ContactPhone { get; set; } + + public int? MaxUsers { get; set; } + + public string? Description { get; set; } + + public string Status { get; set; } = "active"; + + public DateTime? ExpiresAt { get; set; } +}