Add project files.
This commit is contained in:
11
Gateway/Models/CampaignDto.cs
Normal file
11
Gateway/Models/CampaignDto.cs
Normal 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; } = "";
|
||||
}
|
||||
17
Gateway/Models/CreateCampaignRequest.cs
Normal file
17
Gateway/Models/CreateCampaignRequest.cs
Normal 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; }
|
||||
}
|
||||
10
Gateway/Models/CreateCampaignResult.cs
Normal file
10
Gateway/Models/CreateCampaignResult.cs
Normal 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; }
|
||||
}
|
||||
22
Gateway/Models/ExecutionRequest.cs
Normal file
22
Gateway/Models/ExecutionRequest.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
14
Gateway/Models/ExecutionResponse.cs
Normal file
14
Gateway/Models/ExecutionResponse.cs
Normal 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; }
|
||||
}
|
||||
9
Gateway/Models/ProviderRequest.cs
Normal file
9
Gateway/Models/ProviderRequest.cs
Normal 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; }
|
||||
}
|
||||
16
Gateway/Models/ProviderResponse.cs
Normal file
16
Gateway/Models/ProviderResponse.cs
Normal 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; }
|
||||
}
|
||||
Reference in New Issue
Block a user