AppSettingsConfiguration.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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 IntegrationHttp IntegrationHttp { 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 LoginSettings
  68. {
  69. public int MaxFailedAccessAttempts { get; set; }
  70. public int DefaultLockoutTimeSpanInDays { get; set; }
  71. }
  72. public class IntegrationHttp
  73. {
  74. public Financial Financial { get; set; }
  75. }
  76. public class Financial
  77. {
  78. public string BaseUrl { get; set; }
  79. public bool IsIntegrated { get; set; }
  80. //public JournalVoucher JournalVoucher { get; set; }
  81. public Account Account { get; set; }
  82. }
  83. //public class JournalVoucher
  84. //{
  85. // public string CreateAutoVoucher { get; set; }
  86. // public string DeleteVoucher { get; set; }
  87. // public string CreateExgratiaVoucher { get; set; }
  88. // public string CreateLoungeVoucher { get; set; }
  89. //}
  90. public class Account
  91. {
  92. public string CreateAccount { get; set; }
  93. public string DeleteAccount { get; set; }
  94. }
  95. }