mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-15 22:18:09 +01:00
tcloud compatibility, dotnet bug fixes
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace TrainSearchWorker.Models;
|
||||
|
||||
public record BookTrainsRequest
|
||||
{
|
||||
[JsonPropertyName("train_ids")]
|
||||
public required string TrainIds { get; init; }
|
||||
}
|
||||
|
||||
17
enterprise/Models/BookTrainsResponse.cs
Normal file
17
enterprise/Models/BookTrainsResponse.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace TrainSearchWorker.Models;
|
||||
|
||||
public record BookTrainsResponse
|
||||
{
|
||||
[JsonPropertyName("booking_reference")]
|
||||
public required string BookingReference { get; init; }
|
||||
|
||||
// If the API now returns train_ids as an array, use List<string>
|
||||
[JsonPropertyName("train_ids")]
|
||||
public required List<string> TrainIds { get; init; }
|
||||
|
||||
[JsonPropertyName("status")]
|
||||
public required string Status { get; init; }
|
||||
}
|
||||
@@ -1,12 +1,27 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace TrainSearchWorker.Models;
|
||||
|
||||
public record Journey
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public required string Id { get; init; }
|
||||
|
||||
[JsonPropertyName("type")]
|
||||
public required string Type { get; init; }
|
||||
|
||||
[JsonPropertyName("departure")]
|
||||
public required string Departure { get; init; }
|
||||
|
||||
[JsonPropertyName("arrival")]
|
||||
public required string Arrival { get; init; }
|
||||
|
||||
[JsonPropertyName("departure_time")]
|
||||
public required string DepartureTime { get; init; }
|
||||
|
||||
[JsonPropertyName("arrival_time")]
|
||||
public required string ArrivalTime { get; init; }
|
||||
|
||||
[JsonPropertyName("price")]
|
||||
public required decimal Price { get; init; }
|
||||
}
|
||||
}
|
||||
10
enterprise/Models/JourneyResponse.cs
Normal file
10
enterprise/Models/JourneyResponse.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace TrainSearchWorker.Models;
|
||||
|
||||
public record JourneyResponse
|
||||
{
|
||||
[JsonPropertyName("journeys")]
|
||||
public List<Journey>? Journeys { get; init; }
|
||||
}
|
||||
@@ -1,9 +1,18 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace TrainSearchWorker.Models;
|
||||
|
||||
public record SearchTrainsRequest
|
||||
{
|
||||
[JsonPropertyName("origin")]
|
||||
public required string From { get; init; }
|
||||
|
||||
[JsonPropertyName("destination")]
|
||||
public required string To { get; init; }
|
||||
|
||||
[JsonPropertyName("outbound_time")]
|
||||
public required string OutboundTime { get; init; }
|
||||
|
||||
[JsonPropertyName("return_time")]
|
||||
public required string ReturnTime { get; init; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user