EmailOut-Entität und EmailOutDto-Record für die Datenbankzuordnung und Datenübertragung hinzugefügt. Die Projektebenen sind gemäß den Prinzipien der Clean Architecture strukturiert.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace DigitalData.EmailProfilerGateway.API.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
||||
public class MailController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<MailController> _logger;
|
||||
|
||||
public MailController(ILogger<MailController> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.15" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,25 @@
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
|
||||
builder.Services.AddControllers();
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:6499",
|
||||
"sslPort": 44381
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "http://localhost:5231",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "https://localhost:7115;http://localhost:5231",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
namespace DigitalData.EmailProfilerGateway.Application.DTOs
|
||||
{
|
||||
public record EmailOutDto(
|
||||
int Guid,
|
||||
int ReminderTypeId,
|
||||
int SendingProfile,
|
||||
int ReferenceId,
|
||||
string ReferenceString,
|
||||
int? EntityId,
|
||||
int WfId,
|
||||
string WfReference,
|
||||
string EmailAddress,
|
||||
string EmailSubj,
|
||||
string EmailBody,
|
||||
string EmailAttmt1,
|
||||
DateTime? EmailSent,
|
||||
string Comment,
|
||||
string AddedWho,
|
||||
DateTime? AddedWhen,
|
||||
string ChangedWho,
|
||||
DateTime? ChangedWhen,
|
||||
DateTime? ErrorTimestamp,
|
||||
string ErrorMsg
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Services\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,93 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace DigitalData.EmailProfilerGateway.Domain.Entities
|
||||
{
|
||||
[Table("TBEMLP_EMAIL_OUT")]
|
||||
public class EmailOut
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column("GUID")]
|
||||
public int Guid { get; set; }
|
||||
|
||||
[Required]
|
||||
[DefaultValue(1)]
|
||||
[Column("REMINDER_TYPE_ID")]
|
||||
public int ReminderTypeId { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("SENDING_PROFILE")]
|
||||
public int SendingProfile { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("REFERENCE_ID")]
|
||||
public int ReferenceId { get; set; }
|
||||
|
||||
[Column("REFERENCE_STRING", TypeName = "varchar(200)")]
|
||||
[StringLength(200)]
|
||||
public string ReferenceString { get; set; }
|
||||
|
||||
[Column("ENTITY_ID")]
|
||||
public int? EntityId { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("WF_ID")]
|
||||
public int WfId { get; set; }
|
||||
|
||||
[Column("WF_REFERENCE", TypeName = "varchar(200)")]
|
||||
[StringLength(200)]
|
||||
public string WfReference { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("EMAIL_ADRESS", TypeName = "varchar(1000)")]
|
||||
[StringLength(1000)]
|
||||
public string EmailAddress { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("EMAIL_SUBJ", TypeName = "varchar(500)")]
|
||||
[StringLength(500)]
|
||||
public string EmailSubj { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("EMAIL_BODY", TypeName = "varchar(max)")]
|
||||
public string EmailBody { get; set; }
|
||||
|
||||
[Column("EMAIL_ATTMT1", TypeName = "varchar(512)")]
|
||||
[StringLength(512)]
|
||||
public string EmailAttmt1 { get; set; }
|
||||
|
||||
[Column("EMAIL_SENT")]
|
||||
public DateTime? EmailSent { get; set; }
|
||||
|
||||
[Column("COMMENT", TypeName = "varchar(500)")]
|
||||
[StringLength(500)]
|
||||
public string Comment { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ADDED_WHO", TypeName = "varchar(50)")]
|
||||
[StringLength(50)]
|
||||
[DefaultValue("DEFAULT")]
|
||||
public string AddedWho { get; set; }
|
||||
|
||||
[Column("ADDED_WHEN")]
|
||||
[DefaultValue("getdate()")]
|
||||
public DateTime? AddedWhen { get; set; }
|
||||
|
||||
[Column("CHANGED_WHO", TypeName = "varchar(50)")]
|
||||
[StringLength(50)]
|
||||
public string ChangedWho { get; set; }
|
||||
|
||||
[Column("CHANGED_WHEN")]
|
||||
public DateTime? ChangedWhen { get; set; }
|
||||
|
||||
[Column("ERROR_TIMESTAMP")]
|
||||
public DateTime? ErrorTimestamp { get; set; }
|
||||
|
||||
[Column("ERROR_MSG", TypeName = "varchar(900)")]
|
||||
[StringLength(900)]
|
||||
public string ErrorMsg { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Repositories\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,43 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.9.34622.214
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DigitalData.EmailProfilerGateway.API", "DigitalData.EmailProfilerGateway.API\DigitalData.EmailProfilerGateway.API.csproj", "{352BEA44-4D3E-4D22-B1B3-B3E06A928396}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DigitalData.EmailProfilerGateway.Domain", "DigitalData.EmailProfilerGateway.Domain\DigitalData.EmailProfilerGateway.Domain.csproj", "{2F650B4D-65F4-4F91-89C0-803790612C4E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DigitalData.EmailProfilerGateway.Application", "DigitalData.EmailProfilerGateway.Application\DigitalData.EmailProfilerGateway.Application.csproj", "{4C42937A-944D-4AAB-A835-F7EEC2C8872F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DigitalData.EmailProfilerGateway.Infrastructure", "DigitalData.EmailProfilerGateway.Infrastructure\DigitalData.EmailProfilerGateway.Infrastructure.csproj", "{F02B6F5B-FB2F-4E20-996D-BE99E9768039}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{352BEA44-4D3E-4D22-B1B3-B3E06A928396}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{352BEA44-4D3E-4D22-B1B3-B3E06A928396}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{352BEA44-4D3E-4D22-B1B3-B3E06A928396}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{352BEA44-4D3E-4D22-B1B3-B3E06A928396}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2F650B4D-65F4-4F91-89C0-803790612C4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2F650B4D-65F4-4F91-89C0-803790612C4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2F650B4D-65F4-4F91-89C0-803790612C4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2F650B4D-65F4-4F91-89C0-803790612C4E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4C42937A-944D-4AAB-A835-F7EEC2C8872F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4C42937A-944D-4AAB-A835-F7EEC2C8872F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4C42937A-944D-4AAB-A835-F7EEC2C8872F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4C42937A-944D-4AAB-A835-F7EEC2C8872F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F02B6F5B-FB2F-4E20-996D-BE99E9768039}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F02B6F5B-FB2F-4E20-996D-BE99E9768039}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F02B6F5B-FB2F-4E20-996D-BE99E9768039}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F02B6F5B-FB2F-4E20-996D-BE99E9768039}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {CB0B8122-D532-4A7F-87CC-760B959A433C}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Reference in New Issue
Block a user