Add project files.

This commit is contained in:
Grae Jones
2026-02-03 15:04:37 -08:00
parent a4838b594d
commit 8e7e03702e
65 changed files with 6227 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
namespace Gateway.Models;
public class CampaignDto
{
public string Network { get; set; } = "";
public string ExternalAccountId { get; set; } = "";
public string CampaignId { get; set; } = "";
public string Name { get; set; } = "";
public string Status { get; set; } = "";
public string ChannelType { get; set; } = "";
}

View File

@@ -0,0 +1,17 @@
namespace Gateway.Models;
public class CreateCampaignRequest
{
// Campaign name
public string Name { get; set; } = "";
// For Google: budget uses micros (1,000,000 micros = 1 currency unit)
// e.g. $50/day => 50_000_000 micros
public long DailyBudgetMicros { get; set; }
// Optional: for future (Search/Display/PMax)
public string ChannelType { get; set; } = "Search";
// Optional: where your UI can store draft settings
public Dictionary<string, string>? Meta { get; set; }
}

View File

@@ -0,0 +1,10 @@
namespace Gateway.Models;
public class CreateCampaignResult
{
public string Network { get; set; } = "";
public string ExternalAccountId { get; set; } = "";
public bool Ok { get; set; }
public string? CampaignId { get; set; }
public string? Error { get; set; }
}

View File

@@ -0,0 +1,22 @@
using System.Text.Json;
namespace Gateway.Models
{
public sealed class ExecutionRequest
{
/// <summary>Ad platform provider: google, meta, msads, etc.</summary>
public string Provider { get; set; } = "google";
/// <summary>Sub-module/microservice: system, campaigns, reporting, accounts, etc.</summary>
public string Service { get; set; } = "system";
/// <summary>Specific operation/action: ping, create, list, get, update, delete, etc.</summary>
public string Action { get; set; } = "ping";
/// <summary>Tenant/Customer ID for account context</summary>
public string? TenantId { get; set; }
/// <summary>Raw JSON payload for the operation</summary>
public JsonElement Payload { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
namespace Gateway.Models;
public sealed class ExecutionResponse
{
public bool Ok { get; set; }
public int? LogId { get; set; }
public string Provider { get; set; } = "";
public string Service { get; set; } = "";
public string RequestId { get; set; } = "";
public int ProviderStatus { get; set; }
public long ElapsedMs { get; set; }
public object? Result { get; set; }
public object? Error { get; set; }
}

View File

@@ -0,0 +1,9 @@
namespace Gateway.Models;
public sealed class ProviderRequest
{
public string Operation { get; set; } = string.Empty;
public string? TenantId { get; set; }
public string? RequestId { get; set; }
public Dictionary<string, object>? Payload { get; set; }
}

View File

@@ -0,0 +1,16 @@
namespace Gateway.Models;
public sealed class ProviderResponse
{
public bool Ok { get; set; }
public string? RequestId { get; set; }
public object? Data { get; set; }
public ProviderError? Error { get; set; }
}
public sealed class ProviderError
{
public string Code { get; set; } = "ERROR";
public string Message { get; set; } = "Unknown error";
public object? Detail { get; set; }
}