AppSettingsConfiguration.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace MTWorkHR.Core.Global
  7. {
  8. public class AppSettingsConfiguration
  9. {
  10. public ConnectionStrings ConnectionStrings { get; set; }
  11. public JwtSettings JwtSettings { get; set; }
  12. public AttachmentSettings AttachmentSettings { get; set; }
  13. public EnvironmentSettings EnvironmentSettings { get; set; }
  14. public EmailSettings MailSettings { get; set; }
  15. public OTPSettings OTPSettings { get; set; }
  16. public CaptchaSettings CaptchaSettings { get; set; }
  17. public LoginSettings LoginSettings { get; set; }
  18. public MatchMoveSettings MatchMoveSettings { get; set; }
  19. }
  20. public class ConnectionStrings
  21. {
  22. public string MTWorkHRConnectionString { get; set; }
  23. public string LocalConnectionString { get; set; }
  24. public string BlobConnectionString { get; set; }
  25. }
  26. public class AttachmentSettings
  27. {
  28. public string TempAttachment { get; set; }
  29. public string ActualAttachment { get; set; }
  30. }
  31. public class EnvironmentSettings
  32. {
  33. public bool EnableSwagger { get; set; }
  34. }
  35. public class JwtSettings
  36. {
  37. public string Audience { get; set; }
  38. public string Issuer { get; set; }
  39. public string SecretKey { get; set; }
  40. public int DurationInMinutes { get; set; }
  41. }
  42. public class EmailSettings
  43. {
  44. public string ApiKey { get; set; }
  45. public string FromAddress { get; set; }
  46. public string FromName { get; set; }
  47. public string Password { get; set; }
  48. public string Host { get; set; }
  49. public string TemplatePath { get; set; }
  50. public int Port { get; set; }
  51. }
  52. public class OTPSettings
  53. {
  54. public int Length { get; set; } = 4;
  55. public int ExpirePeriodInMinutes { get; set; }
  56. public string MessageSubject { get; set; }
  57. public string MessageBody { get; set; }
  58. public bool SendEmail { get; set; }
  59. public bool SendSMS { get; set; }
  60. public bool AllowZeros { get; set; } = true;
  61. }
  62. public class CaptchaSettings
  63. {
  64. public int Length { get; set; }
  65. public int ExpirePeriodInSeconds { get; set; }
  66. }
  67. public class MatchMoveSettings
  68. {
  69. public string BaseUrl { get; set; }
  70. public string ClientId { get; set; }
  71. public string ClientSecret { get; set; }
  72. public string GrantType { get; set; }
  73. }
  74. public class LoginSettings
  75. {
  76. public int MaxFailedAccessAttempts { get; set; }
  77. public int DefaultLockoutTimeSpanInDays { get; set; }
  78. }
  79. }