using System;
using System.Collections.Generic;

namespace XplorePlane.Models
{
    public class PipelineModel
    {
        public Guid Id { get; set; } = Guid.NewGuid();
        public string Name { get; set; } = string.Empty;
        public string DeviceId { get; set; } = string.Empty;
        public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
        public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
        public List<PipelineNodeModel> Nodes { get; set; } = new();
    }

    public class PipelineNodeModel
    {
        public Guid Id { get; set; } = Guid.NewGuid();
        public string OperatorKey { get; set; } = string.Empty;
        public int Order { get; set; }
        public bool IsEnabled { get; set; } = true;
        public Dictionary<string, object> Parameters { get; set; } = new();
    }

    public class PipelineReorderArgs
    {
        public int OldIndex { get; set; }
        public int NewIndex { get; set; }
    }
}
