danylokhodus's picture
init
b9c7f0e
Raw History Blame
2.09 kB
using System;
using System.Collections.Generic;
namespace FlowAPI.Application.DTOs.Graph
{
public class CreateGraphDto
{
public Guid UserId { get; set; }
public string Title { get; set; } = string.Empty;
public string? Description { get; set; }
}
public class UpdateGraphDto
{
public string? Title { get; set; }
public string? Description { get; set; }
}
public class GraphResponseDto
{
public Guid Id { get; set; }
public Guid UserId { get; set; }
public string Title { get; set; } = string.Empty;
public string? Description { get; set; }
public DateTime CreatedAt { get; set; }
public bool IsShared { get; set; } = false;
public string Permission { get; set; } = "Owner"; // "Owner", "Read", "Edit"
}
public class FullGraphResponseDto : GraphResponseDto
{
public List<NodeDto> Nodes { get; set; } = new();
public List<EdgeDto> Edges { get; set; } = new();
}
public class ShareGraphRequestDto
{
public string Email { get; set; } = string.Empty;
public string Permission { get; set; } = "Read"; // "Read" or "Edit"
}
public class SharedUserResponseDto
{
public Guid Id { get; set; }
public Guid SharedWithUserId { get; set; }
public string Email { get; set; } = string.Empty;
public string DisplayName { get; set; } = string.Empty;
public string Permission { get; set; } = "Read";
}
public class NodeDto
{
public Guid Id { get; set; }
public string Label { get; set; } = string.Empty;
public double PosX { get; set; }
public double PosY { get; set; }
public string Type { get; set; } = "sketch";
public int State { get; set; }
public string? Decision { get; set; }
}
public class EdgeDto
{
public Guid Id { get; set; }
public Guid FromNodeId { get; set; }
public Guid ToNodeId { get; set; }
public string? Condition { get; set; }
}
}