File size: 3,056 Bytes
e0e601c
b9c7f0e
 
 
e0e601c
b9c7f0e
e0e601c
b9c7f0e
 
 
e0e601c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1b321bd
e0e601c
 
 
 
 
 
 
 
 
 
 
 
 
 
e4a761a
 
 
 
 
 
 
 
 
 
b9c7f0e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e0e601c
 
b9c7f0e
 
 
 
 
e0e601c
b9c7f0e
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
using FlowAPI.Domain.Enums;

namespace FlowAPI.Application.DTOs.Graph
{
    public class FullGraphResponseDto
    {
        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; }
        public string Permission { get; set; } = "Owner";

        public List<NodeDto> Nodes { get; set; } = new();
        public List<EdgeDto> Edges { get; set; } = new();
    }

    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; }
        
        // Extended visual/content fields
        public string? Description { get; set; }
        public string? Color { get; set; }
        public bool IsPinned { get; set; }
        public double? Width { get; set; }
        public double? Height { get; set; }
        public string? Data { get; set; }
        public bool? HasLargeData { 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; } = "True";
    }

    public class CreateGraphDto
    {
        public string Title { get; set; } = string.Empty;
        public string? Description { get; set; }
        public string? TemplateKey { get; set; }
    }

    public class TemplateInfoDto
    {
        public string Key { get; set; } = string.Empty;
        public string Title { get; set; } = string.Empty;
        public string Description { get; set; } = string.Empty;
        public string Icon { get; set; } = string.Empty;
        public string Category { get; set; } = string.Empty;
    }

    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; }
        public string Permission { get; set; } = "Owner";
    }

    public class ShareGraphRequestDto
    {
        public string Email { get; set; } = string.Empty;
        public string Permission { get; set; } = "Read";
    }

    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";
    }
}