Initial commit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to copy selected nodes and edges with an offset
|
||||
/// </summary>
|
||||
public class CopyNodesRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Layout level ID
|
||||
/// </summary>
|
||||
public Guid LayoutLevelId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// List of node IDs to copy
|
||||
/// </summary>
|
||||
public List<Guid> NodeIds { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// List of edge IDs to copy (only edges where both nodes are in NodeIds will be copied)
|
||||
/// </summary>
|
||||
public List<Guid> EdgeIds { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Offset X in world coordinates (meters)
|
||||
/// </summary>
|
||||
public double OffsetX { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Offset Y in world coordinates (meters)
|
||||
/// </summary>
|
||||
public double OffsetY { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
using RobotNet10.MapEditor.Shared.DTOs.Edge;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to create a new edge
|
||||
/// Coordinates in METERS (world coordinates)
|
||||
/// </summary>
|
||||
public class CreateEdgeRequest
|
||||
{
|
||||
public Guid LayoutLevelId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Start point X coordinate in METERS
|
||||
/// </summary>
|
||||
public double X1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Start point Y coordinate in METERS
|
||||
/// </summary>
|
||||
public double Y1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// End point X coordinate in METERS
|
||||
/// </summary>
|
||||
public double X2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// End point Y coordinate in METERS
|
||||
/// </summary>
|
||||
public double Y2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional edge name (if not provided, auto-generated)
|
||||
/// </summary>
|
||||
[System.ComponentModel.DataAnnotations.StringLength(256, ErrorMessage = "EdgeName must not exceed 256 characters")]
|
||||
public string? EdgeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional edge description
|
||||
/// </summary>
|
||||
[System.ComponentModel.DataAnnotations.StringLength(10000, ErrorMessage = "EdgeDescription must not exceed 10000 characters")]
|
||||
public string? EdgeDescription { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional vehicle properties for this edge
|
||||
/// </summary>
|
||||
public List<EdgeVehiclePropertyDto>? VehicleProperties { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using RobotNet10.MapEditor.Shared.Models;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to create a new layout level
|
||||
/// </summary>
|
||||
public class CreateLayoutLevelRequest
|
||||
{
|
||||
[Required(ErrorMessage = "LayoutLevelId is required")]
|
||||
[StringLength(64, ErrorMessage = "LayoutLevelId must not exceed 64 characters")]
|
||||
public string LayoutLevelId { get; set; } = string.Empty;
|
||||
public int LevelOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional coordinate system configuration
|
||||
/// If not provided, defaults will be used
|
||||
/// </summary>
|
||||
public CoordinateSystemInfo? CoordinateSystem { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to create a new layout
|
||||
/// </summary>
|
||||
public class CreateLayoutRequest
|
||||
{
|
||||
[Required(ErrorMessage = "LayoutId is required")]
|
||||
[StringLength(64, ErrorMessage = "LayoutId must not exceed 64 characters")]
|
||||
public string LayoutId { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "LayoutName is required")]
|
||||
[StringLength(256, ErrorMessage = "LayoutName must not exceed 256 characters")]
|
||||
public string LayoutName { get; set; } = string.Empty;
|
||||
|
||||
[StringLength(10000, ErrorMessage = "Description must not exceed 10000 characters")]
|
||||
public string? Description { get; set; }
|
||||
|
||||
public string? CreatedBy { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to create a new layout version
|
||||
/// </summary>
|
||||
public class CreateLayoutVersionRequest
|
||||
{
|
||||
public string Version { get; set; } = string.Empty;
|
||||
public string? LayoutDescription { get; set; }
|
||||
public string? CreatedBy { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to create a new station
|
||||
/// </summary>
|
||||
public class CreateStationRequest
|
||||
{
|
||||
public Guid LayoutLevelId { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "StationId is required")]
|
||||
[StringLength(64, ErrorMessage = "StationId must not exceed 64 characters")]
|
||||
public string StationId { get; set; } = string.Empty;
|
||||
|
||||
[StringLength(256, ErrorMessage = "StationName must not exceed 256 characters")]
|
||||
public string? StationName { get; set; }
|
||||
|
||||
[StringLength(10000, ErrorMessage = "StationDescription must not exceed 10000 characters")]
|
||||
public string? StationDescription { get; set; }
|
||||
public double? StationHeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// X coordinate in METERS
|
||||
/// </summary>
|
||||
public double X { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Y coordinate in METERS
|
||||
/// </summary>
|
||||
public double Y { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Theta orientation in radians (optional)
|
||||
/// </summary>
|
||||
public double? Theta { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Node IDs to link as interaction nodes
|
||||
/// </summary>
|
||||
public List<Guid>? InteractionNodeIds { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to create a new vehicle type
|
||||
/// </summary>
|
||||
public class CreateVehicleTypeRequest
|
||||
{
|
||||
[Required(ErrorMessage = "VehicleTypeId is required")]
|
||||
[StringLength(64, ErrorMessage = "VehicleTypeId must not exceed 64 characters")]
|
||||
[RegularExpression(@"^[a-zA-Z0-9\-_]+$",
|
||||
ErrorMessage = "VehicleTypeId must contain only alphanumeric characters, hyphens, and underscores")]
|
||||
public string VehicleTypeId { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "VehicleTypeName is required")]
|
||||
[StringLength(256, ErrorMessage = "VehicleTypeName must not exceed 256 characters")]
|
||||
public string VehicleTypeName { get; set; } = string.Empty;
|
||||
|
||||
[MaxLength(10000, ErrorMessage = "Description must not exceed 10000 characters")]
|
||||
public string? Description { get; set; }
|
||||
|
||||
[MaxLength(50000, ErrorMessage = "Specifications must not exceed 50000 characters")]
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Actions default that vehicle can perform (VDMA LIF: actions)
|
||||
/// JSON array format:
|
||||
/// [
|
||||
/// {
|
||||
/// "actionType": "pick",
|
||||
/// "actionDescription": "...",
|
||||
/// "requirementType": "REQUIRED", // Enum: REQUIRED, CONDITIONAL, OPTIONAL
|
||||
/// "blockingType": "HARD",
|
||||
/// "actionParameters": [{"key": "...", "value": "..."}]
|
||||
/// }
|
||||
/// ]
|
||||
/// </summary>
|
||||
[MaxLength(50000, ErrorMessage = "Actions must not exceed 50000 characters")]
|
||||
public string? Actions { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to delete multiple edges in a transaction
|
||||
/// </summary>
|
||||
public class DeleteEdgesRequest
|
||||
{
|
||||
public List<Guid> EdgeIds { get; set; } = new();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to merge multiple nodes into one
|
||||
/// </summary>
|
||||
public class MergeNodesRequest
|
||||
{
|
||||
public Guid LevelId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// List of node IDs to merge
|
||||
/// </summary>
|
||||
public List<Guid> NodeIds { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Optional: Specify center position for merged node
|
||||
/// If not provided, will calculate center from nodes
|
||||
/// </summary>
|
||||
public double? CenterX { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional: Specify center position for merged node
|
||||
/// If not provided, will calculate center from nodes
|
||||
/// </summary>
|
||||
public double? CenterY { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
using RobotNet10.MapEditor.Shared.DTOs.Node;
|
||||
using RobotNet10.MapEditor.Shared.DTOs.Edge;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to save all layout changes (nodes and edges) in a batch operation
|
||||
/// </summary>
|
||||
public class SaveLayoutDataRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Layout level ID
|
||||
/// </summary>
|
||||
public Guid LayoutLevelId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Nodes to update (only modified nodes should be included)
|
||||
/// </summary>
|
||||
public List<NodeUpdateItem> Nodes { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Edges to update (only modified edges should be included)
|
||||
/// </summary>
|
||||
public List<EdgeUpdateItem> Edges { get; set; } = new();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Node update item for batch save
|
||||
/// </summary>
|
||||
public class NodeUpdateItem
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public double? X { get; set; }
|
||||
public double? Y { get; set; }
|
||||
public string? NodeName { get; set; }
|
||||
public string? NodeDescription { get; set; }
|
||||
public string? MapId { get; set; }
|
||||
public List<NodeVehiclePropertyDto>? VehicleProperties { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Edge update item for batch save
|
||||
/// </summary>
|
||||
public class EdgeUpdateItem
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string? EdgeName { get; set; }
|
||||
public string? EdgeDescription { get; set; }
|
||||
public List<EdgeVehiclePropertyDto>? VehicleProperties { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to split a node into multiple nodes
|
||||
/// </summary>
|
||||
public class SplitNodeRequest
|
||||
{
|
||||
public Guid LevelId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Node ID to split
|
||||
/// </summary>
|
||||
public Guid NodeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional: Offset distance for new nodes (in meters)
|
||||
/// Default: 0.1m (10cm)
|
||||
/// </summary>
|
||||
public double? OffsetDistance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional: Node ID to assign station to (if original node had station)
|
||||
/// If not provided, station will be assigned to first new node
|
||||
/// </summary>
|
||||
public Guid? StationNodeId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using RobotNet10.MapEditor.Shared.DTOs.Edge;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to update an existing edge
|
||||
/// </summary>
|
||||
public class UpdateEdgeRequest
|
||||
{
|
||||
public string? EdgeName { get; set; }
|
||||
public string? EdgeDescription { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Updated vehicle properties (replaces existing)
|
||||
/// </summary>
|
||||
public List<EdgeVehiclePropertyDto>? VehicleProperties { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
using RobotNet10.MapEditor.Shared.Models;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to update a layout level
|
||||
/// </summary>
|
||||
public class UpdateLayoutLevelRequest
|
||||
{
|
||||
public string? LayoutLevelId { get; set; }
|
||||
public int? LevelOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional coordinate system configuration update
|
||||
/// </summary>
|
||||
public CoordinateSystemInfo? CoordinateSystem { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional editor settings configuration update
|
||||
/// </summary>
|
||||
public EditorSettingsInfo? EditorSettings { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to update an existing layout
|
||||
/// </summary>
|
||||
public class UpdateLayoutRequest
|
||||
{
|
||||
public string LayoutName { get; set; } = string.Empty;
|
||||
public string? Description { get; set; }
|
||||
public string? ModifiedBy { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
using RobotNet10.MapEditor.Shared.DTOs.Node;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to update an existing node
|
||||
/// </summary>
|
||||
public class UpdateNodeRequest
|
||||
{
|
||||
public double? X { get; set; }
|
||||
public double? Y { get; set; }
|
||||
public string? NodeName { get; set; }
|
||||
public string? NodeDescription { get; set; }
|
||||
public string? MapId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Updated vehicle properties (replaces existing)
|
||||
/// </summary>
|
||||
public List<NodeVehiclePropertyDto>? VehicleProperties { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to update an existing station
|
||||
/// </summary>
|
||||
public class UpdateStationRequest
|
||||
{
|
||||
public string? StationName { get; set; }
|
||||
public string? StationDescription { get; set; }
|
||||
public double? StationHeight { get; set; }
|
||||
public double? X { get; set; }
|
||||
public double? Y { get; set; }
|
||||
public double? Theta { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Updated interaction node IDs (replaces existing links)
|
||||
/// </summary>
|
||||
public List<Guid>? InteractionNodeIds { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to update an existing vehicle type
|
||||
/// </summary>
|
||||
public class UpdateVehicleTypeRequest
|
||||
{
|
||||
[StringLength(256, ErrorMessage = "VehicleTypeName must not exceed 256 characters")]
|
||||
public string? VehicleTypeName { get; set; }
|
||||
|
||||
[MaxLength(10000, ErrorMessage = "Description must not exceed 10000 characters")]
|
||||
public string? Description { get; set; }
|
||||
|
||||
[MaxLength(50000, ErrorMessage = "Specifications must not exceed 50000 characters")]
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Actions default that vehicle can perform (VDMA LIF: actions)
|
||||
/// JSON array format:
|
||||
/// [
|
||||
/// {
|
||||
/// "actionType": "pick",
|
||||
/// "actionDescription": "...",
|
||||
/// "requirementType": "REQUIRED", // Enum: REQUIRED, CONDITIONAL, OPTIONAL
|
||||
/// "blockingType": "HARD",
|
||||
/// "actionParameters": [{"key": "...", "value": "..."}]
|
||||
/// }
|
||||
/// ]
|
||||
/// </summary>
|
||||
[MaxLength(50000, ErrorMessage = "Actions must not exceed 50000 characters")]
|
||||
public string? Actions { get; set; }
|
||||
|
||||
public bool? IsActive { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user