feat(console): add tenant DTOs
This commit is contained in:
parent
50c443fdfa
commit
8a20a3368e
29
Models/Dtos/CreateTenantDto.cs
Normal file
29
Models/Dtos/CreateTenantDto.cs
Normal file
@ -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; }
|
||||||
|
}
|
||||||
17
Models/Dtos/TenantDto.cs
Normal file
17
Models/Dtos/TenantDto.cs
Normal file
@ -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; }
|
||||||
|
}
|
||||||
11
Models/Dtos/TenantSettingsDto.cs
Normal file
11
Models/Dtos/TenantSettingsDto.cs
Normal file
@ -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<string> PasswordPolicy { get; set; } = new();
|
||||||
|
public int MinPasswordLength { get; set; } = 8;
|
||||||
|
public int SessionTimeout { get; set; } = 120;
|
||||||
|
}
|
||||||
26
Models/Dtos/UpdateTenantDto.cs
Normal file
26
Models/Dtos/UpdateTenantDto.cs
Normal file
@ -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; }
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user