This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
namespace Models.Requests
|
||||
{
|
||||
public class CaptchaVerifyRequest
|
||||
{
|
||||
public string? Token { get; set; }
|
||||
public string? ExpectedAction { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Models.Requests
|
||||
{
|
||||
public sealed class ContactRequest
|
||||
{
|
||||
[Required, StringLength(100)]
|
||||
public string Name { get; set; } = "";
|
||||
|
||||
[Required, EmailAddress, StringLength(200)]
|
||||
public string Email { get; set; } = "";
|
||||
|
||||
[Required, StringLength(200)]
|
||||
public string Subject { get; set; } = "";
|
||||
|
||||
[Required, StringLength(5000)]
|
||||
public string Message { get; set; } = "";
|
||||
|
||||
// Token returned by the captcha widget
|
||||
[Required]
|
||||
public string CaptchaToken { get; set; } = "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace Models.Requests;
|
||||
|
||||
public sealed class JobMatchRequest
|
||||
{
|
||||
public string? CvDocumentId { get; set; }
|
||||
public string? JobUrl { get; set; }
|
||||
public string? JobDescription { get; set; }
|
||||
public bool GdprConsent { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? CaptchaToken { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Models.Requests
|
||||
{
|
||||
public sealed class SubscribeRequest
|
||||
{
|
||||
|
||||
[Required, EmailAddress, StringLength(200)]
|
||||
public string Email { get; set; } = "";
|
||||
|
||||
// Token returned by the captcha widget
|
||||
[Required]
|
||||
public string CaptchaToken { get; set; } = "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using Shared.Models.Requests;
|
||||
|
||||
namespace Models.Requests
|
||||
{
|
||||
public sealed class UploadCvRequest : UploadFileRequest
|
||||
{
|
||||
public bool GdprConsent { get; set; }
|
||||
public string? CaptchaToken { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace Models.Settings
|
||||
{
|
||||
public sealed class CaptchaSettings
|
||||
{
|
||||
// "Recaptcha" for now (easy to extend later)
|
||||
public string Provider { get; set; } = "Recaptcha";
|
||||
|
||||
public string SecretKey { get; set; } = "";
|
||||
public string PublicKey { get; set; } = "";
|
||||
// Only relevant for reCAPTCHA v3 (score-based)
|
||||
public double MinimumScore { get; set; } = 0.5;
|
||||
|
||||
// Optional but recommended for v3: enforce expected action and/or hostname
|
||||
public string? ExpectedAction { get; set; }
|
||||
public string? ExpectedHostname { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Models.Settings
|
||||
{
|
||||
public sealed class ContactSettings
|
||||
{
|
||||
public string ToEmail { get; set; } = "";
|
||||
public string SubjectPrefix { get; set; } = "[Contact]";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace Models.Settings
|
||||
{
|
||||
public sealed class FileStorageSettings
|
||||
{
|
||||
public string Path { get; set; } = "Files";
|
||||
public string DefaultFileName { get; set; } = "";
|
||||
public string ToEmail { get; set; } = "";
|
||||
public string SubjectPrefix { get; set; } = "[File Download]";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Models.Settings
|
||||
{
|
||||
public sealed class GoogleSettings
|
||||
{
|
||||
public string TagManagerId { get; set; } = "";
|
||||
public string MapKey { get; set; } = "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Models.Settings
|
||||
{
|
||||
public sealed class KeyVaultSettings
|
||||
{
|
||||
public string VaultUri { get; set; } = "";
|
||||
public bool Enabled { get; set; } = false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace Models.Settings
|
||||
{
|
||||
public class SmtpSettings
|
||||
{
|
||||
public string Host { get; set; } = "";
|
||||
public int Port { get; set; } = 587;
|
||||
public string Username { get; set; } = "";
|
||||
public string Password { get; set; } = "";
|
||||
public bool UseStartTls { get; set; } = true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Models.Settings
|
||||
{
|
||||
public sealed class SubscribeSettings
|
||||
{
|
||||
public string ToEmail { get; set; } = "";
|
||||
public string SubjectPrefix { get; set; } = "[Subscribe]";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>Models</RootNamespace>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http.Features" Version="5.0.17" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\shared-models\shared-models.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user