warrenchen e9712fb1f7 feat: Implement SendEngine database context and migrations
- Added SendEngineDbContext for managing database interactions.
- Created SendEngineDbContextFactory for design-time database context creation.
- Established dependency injection for the infrastructure layer.
- Defined entity configurations for Tenant, MailingList, Subscriber, ListMember, EventInbox, Campaign, SendJob, SendBatch, DeliverySummary, AuthClient, AuthClientKey, and WebhookNonce.
- Generated initial database migration snapshot.
- Implemented installer program for database migration commands.
2026-02-10 17:56:29 +09:00

49 lines
1.4 KiB
C#

using System.Text.Json;
namespace SendEngine.Api.Models;
public sealed class CreateSendJobRequest
{
public Guid TenantId { get; set; }
public Guid ListId { get; set; }
public string? Name { get; set; }
public string? Subject { get; set; }
public string? BodyHtml { get; set; }
public string? BodyText { get; set; }
public JsonElement? Template { get; set; }
public DateTimeOffset? ScheduledAt { get; set; }
public DateTimeOffset? WindowStart { get; set; }
public DateTimeOffset? WindowEnd { get; set; }
public TrackingOptions? Tracking { get; set; }
}
public sealed class TrackingOptions
{
public bool? Open { get; set; }
public bool? Click { get; set; }
}
public sealed class CreateSendJobResponse
{
public Guid SendJobId { get; set; }
public string Status { get; set; } = "pending";
}
public sealed class SendJobResponse
{
public Guid Id { get; set; }
public Guid TenantId { get; set; }
public Guid ListId { get; set; }
public Guid CampaignId { get; set; }
public string Status { get; set; } = "pending";
public DateTimeOffset? ScheduledAt { get; set; }
public DateTimeOffset? WindowStart { get; set; }
public DateTimeOffset? WindowEnd { get; set; }
}
public sealed class SendJobStatusResponse
{
public Guid Id { get; set; }
public string Status { get; set; } = string.Empty;
}