danylokhodus Claude Opus 5.5 commited on
Commit
e3db3df
·
1 Parent(s): 6d07d79

feat: node groups (GroupId on task nodes)

Browse files

- TaskNode.GroupId: a node can belong to a group node ("cluster"); null = top level
- Saved and loaded through the full-graph API, copied in upsert
- Migration AddNodeGroups

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

FlowAPI.Application/DTOs/Graph/GraphDtos.cs CHANGED
@@ -34,6 +34,7 @@ namespace FlowAPI.Application.DTOs.Graph
34
  public double? Height { get; set; }
35
  public string? Data { get; set; }
36
  public bool? HasLargeData { get; set; }
 
37
  }
38
 
39
  public class EdgeDto
 
34
  public double? Height { get; set; }
35
  public string? Data { get; set; }
36
  public bool? HasLargeData { get; set; }
37
+ public Guid? GroupId { get; set; }
38
  }
39
 
40
  public class EdgeDto
FlowAPI.Application/Services/GraphService.cs CHANGED
@@ -128,7 +128,8 @@ namespace FlowAPI.Application.Services
128
  Width = n.Width,
129
  Height = n.Height,
130
  Data = hasLarge ? null : n.Data,
131
- HasLargeData = hasLarge
 
132
  };
133
  }).ToList(),
134
  Edges = graph.Edges.Select(e => new EdgeDto
@@ -262,7 +263,8 @@ namespace FlowAPI.Application.Services
262
  IsPinned = nodeDto.IsPinned,
263
  Width = nodeDto.Width,
264
  Height = nodeDto.Height,
265
- Data = nodeDto.Data
 
266
  }).ToList();
267
 
268
  var mappedEdges = dto.Edges.Select(edgeDto => new Edge
 
128
  Width = n.Width,
129
  Height = n.Height,
130
  Data = hasLarge ? null : n.Data,
131
+ HasLargeData = hasLarge,
132
+ GroupId = n.GroupId
133
  };
134
  }).ToList(),
135
  Edges = graph.Edges.Select(e => new EdgeDto
 
263
  IsPinned = nodeDto.IsPinned,
264
  Width = nodeDto.Width,
265
  Height = nodeDto.Height,
266
+ Data = nodeDto.Data,
267
+ GroupId = nodeDto.GroupId
268
  }).ToList();
269
 
270
  var mappedEdges = dto.Edges.Select(edgeDto => new Edge
FlowAPI.Domain/Entities/TaskNode.cs CHANGED
@@ -22,6 +22,9 @@ namespace FlowAPI.Domain.Entities
22
  // Specific data (Image URL, Text formatting, etc.)
23
  public string? Data { get; set; }
24
 
 
 
 
25
  // Navigation properties
26
  public Graph Graph { get; set; } = null!;
27
  public ICollection<Edge> OutgoingEdges { get; set; } = new List<Edge>();
 
22
  // Specific data (Image URL, Text formatting, etc.)
23
  public string? Data { get; set; }
24
 
25
+ // Id of the group node this node belongs to (null = top level of the board)
26
+ public Guid? GroupId { get; set; }
27
+
28
  // Navigation properties
29
  public Graph Graph { get; set; } = null!;
30
  public ICollection<Edge> OutgoingEdges { get; set; } = new List<Edge>();
FlowAPI.Infrastructure/Migrations/20261111224418_AddNodeGroups.Designer.cs ADDED
@@ -0,0 +1,520 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // <auto-generated />
2
+ using System;
3
+ using FlowAPI.Infrastructure.Data;
4
+ using Microsoft.EntityFrameworkCore;
5
+ using Microsoft.EntityFrameworkCore.Infrastructure;
6
+ using Microsoft.EntityFrameworkCore.Migrations;
7
+ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
8
+
9
+ #nullable disable
10
+
11
+ namespace FlowAPI.Infrastructure.Migrations
12
+ {
13
+ [DbContext(typeof(AppDbContext))]
14
+ [Migration("20261111224418_AddNodeGroups")]
15
+ partial class AddNodeGroups
16
+ {
17
+ /// <inheritdoc />
18
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
19
+ {
20
+ #pragma warning disable 612, 618
21
+ modelBuilder.HasAnnotation("ProductVersion", "10.0.8");
22
+
23
+ modelBuilder.Entity("FlowAPI.Domain.Entities.Achievement", b =>
24
+ {
25
+ b.Property<Guid>("Id")
26
+ .ValueGeneratedOnAdd()
27
+ .HasColumnType("TEXT");
28
+
29
+ b.Property<string>("Category")
30
+ .IsRequired()
31
+ .HasMaxLength(100)
32
+ .HasColumnType("TEXT");
33
+
34
+ b.Property<string>("Description")
35
+ .IsRequired()
36
+ .HasColumnType("TEXT");
37
+
38
+ b.Property<string>("IconUrl")
39
+ .IsRequired()
40
+ .HasColumnType("TEXT");
41
+
42
+ b.Property<int>("RewardPoints")
43
+ .HasColumnType("INTEGER");
44
+
45
+ b.Property<int>("TargetValue")
46
+ .HasColumnType("INTEGER");
47
+
48
+ b.Property<string>("Title")
49
+ .IsRequired()
50
+ .HasMaxLength(200)
51
+ .HasColumnType("TEXT");
52
+
53
+ b.Property<string>("TriggerEventName")
54
+ .IsRequired()
55
+ .HasMaxLength(100)
56
+ .HasColumnType("TEXT");
57
+
58
+ b.Property<int>("Type")
59
+ .HasColumnType("INTEGER");
60
+
61
+ b.HasKey("Id");
62
+
63
+ b.ToTable("Achievements");
64
+ });
65
+
66
+ modelBuilder.Entity("FlowAPI.Domain.Entities.CustomTemplate", b =>
67
+ {
68
+ b.Property<Guid>("Id")
69
+ .ValueGeneratedOnAdd()
70
+ .HasColumnType("TEXT");
71
+
72
+ b.Property<string>("Category")
73
+ .IsRequired()
74
+ .HasMaxLength(100)
75
+ .HasColumnType("TEXT");
76
+
77
+ b.Property<string>("ContentJson")
78
+ .IsRequired()
79
+ .HasMaxLength(10000000)
80
+ .HasColumnType("TEXT");
81
+
82
+ b.Property<DateTime>("CreatedAt")
83
+ .HasColumnType("TEXT");
84
+
85
+ b.Property<string>("Description")
86
+ .IsRequired()
87
+ .HasMaxLength(1000)
88
+ .HasColumnType("TEXT");
89
+
90
+ b.Property<string>("Icon")
91
+ .IsRequired()
92
+ .HasMaxLength(100)
93
+ .HasColumnType("TEXT");
94
+
95
+ b.Property<string>("Title")
96
+ .IsRequired()
97
+ .HasMaxLength(200)
98
+ .HasColumnType("TEXT");
99
+
100
+ b.Property<Guid>("UserId")
101
+ .HasColumnType("TEXT");
102
+
103
+ b.HasKey("Id");
104
+
105
+ b.HasIndex("UserId");
106
+
107
+ b.ToTable("CustomTemplates");
108
+ });
109
+
110
+ modelBuilder.Entity("FlowAPI.Domain.Entities.Edge", b =>
111
+ {
112
+ b.Property<Guid>("Id")
113
+ .ValueGeneratedOnAdd()
114
+ .HasColumnType("TEXT");
115
+
116
+ b.Property<string>("Condition")
117
+ .IsRequired()
118
+ .HasMaxLength(500)
119
+ .HasColumnType("TEXT");
120
+
121
+ b.Property<Guid>("FromNodeId")
122
+ .HasColumnType("TEXT");
123
+
124
+ b.Property<Guid>("GraphId")
125
+ .HasColumnType("TEXT");
126
+
127
+ b.Property<Guid>("ToNodeId")
128
+ .HasColumnType("TEXT");
129
+
130
+ b.HasKey("Id");
131
+
132
+ b.HasIndex("FromNodeId");
133
+
134
+ b.HasIndex("GraphId");
135
+
136
+ b.HasIndex("ToNodeId");
137
+
138
+ b.ToTable("Edges");
139
+ });
140
+
141
+ modelBuilder.Entity("FlowAPI.Domain.Entities.Graph", b =>
142
+ {
143
+ b.Property<Guid>("Id")
144
+ .ValueGeneratedOnAdd()
145
+ .HasColumnType("TEXT");
146
+
147
+ b.Property<DateTime>("CreatedAt")
148
+ .HasColumnType("TEXT");
149
+
150
+ b.Property<string>("Description")
151
+ .HasMaxLength(1000)
152
+ .HasColumnType("TEXT");
153
+
154
+ b.Property<string>("Title")
155
+ .IsRequired()
156
+ .HasMaxLength(200)
157
+ .HasColumnType("TEXT");
158
+
159
+ b.Property<DateTime>("UpdatedAt")
160
+ .HasColumnType("TEXT");
161
+
162
+ b.Property<Guid>("UserId")
163
+ .HasColumnType("TEXT");
164
+
165
+ b.HasKey("Id");
166
+
167
+ b.HasIndex("UserId");
168
+
169
+ b.ToTable("Graphs");
170
+ });
171
+
172
+ modelBuilder.Entity("FlowAPI.Domain.Entities.HabitRecord", b =>
173
+ {
174
+ b.Property<Guid>("Id")
175
+ .ValueGeneratedOnAdd()
176
+ .HasColumnType("TEXT");
177
+
178
+ b.Property<DateTime>("CheckedDate")
179
+ .HasColumnType("TEXT");
180
+
181
+ b.Property<string>("HabitName")
182
+ .IsRequired()
183
+ .HasMaxLength(100)
184
+ .HasColumnType("TEXT");
185
+
186
+ b.Property<int>("StreakCount")
187
+ .HasColumnType("INTEGER");
188
+
189
+ b.Property<Guid>("UserId")
190
+ .HasColumnType("TEXT");
191
+
192
+ b.HasKey("Id");
193
+
194
+ b.HasIndex("UserId");
195
+
196
+ b.ToTable("HabitRecords");
197
+ });
198
+
199
+ modelBuilder.Entity("FlowAPI.Domain.Entities.SharedGraph", b =>
200
+ {
201
+ b.Property<Guid>("Id")
202
+ .ValueGeneratedOnAdd()
203
+ .HasColumnType("TEXT");
204
+
205
+ b.Property<DateTime>("CreatedAt")
206
+ .HasColumnType("TEXT");
207
+
208
+ b.Property<Guid>("GraphId")
209
+ .HasColumnType("TEXT");
210
+
211
+ b.Property<string>("Permission")
212
+ .IsRequired()
213
+ .ValueGeneratedOnAdd()
214
+ .HasMaxLength(50)
215
+ .HasColumnType("TEXT")
216
+ .HasDefaultValue("Read");
217
+
218
+ b.Property<Guid>("SharedWithUserId")
219
+ .HasColumnType("TEXT");
220
+
221
+ b.HasKey("Id");
222
+
223
+ b.HasIndex("SharedWithUserId");
224
+
225
+ b.HasIndex("GraphId", "SharedWithUserId")
226
+ .IsUnique();
227
+
228
+ b.ToTable("SharedGraphs");
229
+ });
230
+
231
+ modelBuilder.Entity("FlowAPI.Domain.Entities.TaskNode", b =>
232
+ {
233
+ b.Property<Guid>("Id")
234
+ .ValueGeneratedOnAdd()
235
+ .HasColumnType("TEXT");
236
+
237
+ b.Property<string>("Color")
238
+ .HasMaxLength(100)
239
+ .HasColumnType("TEXT");
240
+
241
+ b.Property<DateTime>("CreatedAt")
242
+ .HasColumnType("TEXT");
243
+
244
+ b.Property<string>("Data")
245
+ .HasMaxLength(10000000)
246
+ .HasColumnType("TEXT");
247
+
248
+ b.Property<string>("Decision")
249
+ .HasMaxLength(1000000)
250
+ .HasColumnType("TEXT");
251
+
252
+ b.Property<string>("Description")
253
+ .HasMaxLength(10000)
254
+ .HasColumnType("TEXT");
255
+
256
+ b.Property<Guid>("GraphId")
257
+ .HasColumnType("TEXT");
258
+
259
+ b.Property<Guid?>("GroupId")
260
+ .HasColumnType("TEXT");
261
+
262
+ b.Property<double?>("Height")
263
+ .HasColumnType("REAL");
264
+
265
+ b.Property<bool>("IsPinned")
266
+ .HasColumnType("INTEGER");
267
+
268
+ b.Property<string>("Label")
269
+ .IsRequired()
270
+ .HasMaxLength(1000)
271
+ .HasColumnType("TEXT");
272
+
273
+ b.Property<double>("PosX")
274
+ .HasColumnType("REAL");
275
+
276
+ b.Property<double>("PosY")
277
+ .HasColumnType("REAL");
278
+
279
+ b.Property<string>("State")
280
+ .IsRequired()
281
+ .ValueGeneratedOnAdd()
282
+ .HasColumnType("TEXT")
283
+ .HasDefaultValue("Pending");
284
+
285
+ b.Property<string>("Type")
286
+ .IsRequired()
287
+ .ValueGeneratedOnAdd()
288
+ .HasMaxLength(100)
289
+ .HasColumnType("TEXT")
290
+ .HasDefaultValue("sketch");
291
+
292
+ b.Property<double?>("Width")
293
+ .HasColumnType("REAL");
294
+
295
+ b.HasKey("Id");
296
+
297
+ b.HasIndex("GraphId");
298
+
299
+ b.ToTable("TaskNodes");
300
+ });
301
+
302
+ modelBuilder.Entity("FlowAPI.Domain.Entities.User", b =>
303
+ {
304
+ b.Property<Guid>("Id")
305
+ .ValueGeneratedOnAdd()
306
+ .HasColumnType("TEXT");
307
+
308
+ b.Property<string>("AvatarUrl")
309
+ .HasColumnType("TEXT");
310
+
311
+ b.Property<DateTime>("CreatedAt")
312
+ .HasColumnType("TEXT");
313
+
314
+ b.Property<int>("DailyAiGenerationsCount")
315
+ .HasColumnType("INTEGER");
316
+
317
+ b.Property<string>("DisplayName")
318
+ .IsRequired()
319
+ .HasMaxLength(100)
320
+ .HasColumnType("TEXT");
321
+
322
+ b.Property<string>("Email")
323
+ .IsRequired()
324
+ .HasMaxLength(256)
325
+ .HasColumnType("TEXT");
326
+
327
+ b.Property<bool>("IsPremium")
328
+ .HasColumnType("INTEGER");
329
+
330
+ b.Property<DateTime>("LastAiGenerationDate")
331
+ .HasColumnType("TEXT");
332
+
333
+ b.Property<string>("PasswordHash")
334
+ .IsRequired()
335
+ .HasColumnType("TEXT");
336
+
337
+ b.Property<string>("SubscriptionTier")
338
+ .IsRequired()
339
+ .ValueGeneratedOnAdd()
340
+ .HasMaxLength(50)
341
+ .HasColumnType("TEXT")
342
+ .HasDefaultValue("Free");
343
+
344
+ b.HasKey("Id");
345
+
346
+ b.HasIndex("Email")
347
+ .IsUnique();
348
+
349
+ b.ToTable("Users");
350
+ });
351
+
352
+ modelBuilder.Entity("FlowAPI.Domain.Entities.UserAchievement", b =>
353
+ {
354
+ b.Property<Guid>("Id")
355
+ .ValueGeneratedOnAdd()
356
+ .HasColumnType("TEXT");
357
+
358
+ b.Property<Guid>("AchievementId")
359
+ .HasColumnType("TEXT");
360
+
361
+ b.Property<int>("CurrentValue")
362
+ .HasColumnType("INTEGER");
363
+
364
+ b.Property<bool>("IsUnlocked")
365
+ .HasColumnType("INTEGER");
366
+
367
+ b.Property<DateTime?>("UnlockedAt")
368
+ .HasColumnType("TEXT");
369
+
370
+ b.Property<Guid>("UserId")
371
+ .HasColumnType("TEXT");
372
+
373
+ b.HasKey("Id");
374
+
375
+ b.HasIndex("AchievementId");
376
+
377
+ b.HasIndex("UserId");
378
+
379
+ b.ToTable("UserAchievements");
380
+ });
381
+
382
+ modelBuilder.Entity("FlowAPI.Domain.Entities.CustomTemplate", b =>
383
+ {
384
+ b.HasOne("FlowAPI.Domain.Entities.User", "User")
385
+ .WithMany()
386
+ .HasForeignKey("UserId")
387
+ .OnDelete(DeleteBehavior.Cascade)
388
+ .IsRequired();
389
+
390
+ b.Navigation("User");
391
+ });
392
+
393
+ modelBuilder.Entity("FlowAPI.Domain.Entities.Edge", b =>
394
+ {
395
+ b.HasOne("FlowAPI.Domain.Entities.TaskNode", "FromNode")
396
+ .WithMany("OutgoingEdges")
397
+ .HasForeignKey("FromNodeId")
398
+ .OnDelete(DeleteBehavior.Cascade)
399
+ .IsRequired();
400
+
401
+ b.HasOne("FlowAPI.Domain.Entities.Graph", "Graph")
402
+ .WithMany("Edges")
403
+ .HasForeignKey("GraphId")
404
+ .OnDelete(DeleteBehavior.Cascade)
405
+ .IsRequired();
406
+
407
+ b.HasOne("FlowAPI.Domain.Entities.TaskNode", "ToNode")
408
+ .WithMany("IncomingEdges")
409
+ .HasForeignKey("ToNodeId")
410
+ .OnDelete(DeleteBehavior.Cascade)
411
+ .IsRequired();
412
+
413
+ b.Navigation("FromNode");
414
+
415
+ b.Navigation("Graph");
416
+
417
+ b.Navigation("ToNode");
418
+ });
419
+
420
+ modelBuilder.Entity("FlowAPI.Domain.Entities.Graph", b =>
421
+ {
422
+ b.HasOne("FlowAPI.Domain.Entities.User", "User")
423
+ .WithMany("Graphs")
424
+ .HasForeignKey("UserId")
425
+ .OnDelete(DeleteBehavior.Cascade)
426
+ .IsRequired();
427
+
428
+ b.Navigation("User");
429
+ });
430
+
431
+ modelBuilder.Entity("FlowAPI.Domain.Entities.HabitRecord", b =>
432
+ {
433
+ b.HasOne("FlowAPI.Domain.Entities.User", "User")
434
+ .WithMany("HabitRecords")
435
+ .HasForeignKey("UserId")
436
+ .OnDelete(DeleteBehavior.Cascade)
437
+ .IsRequired();
438
+
439
+ b.Navigation("User");
440
+ });
441
+
442
+ modelBuilder.Entity("FlowAPI.Domain.Entities.SharedGraph", b =>
443
+ {
444
+ b.HasOne("FlowAPI.Domain.Entities.Graph", "Graph")
445
+ .WithMany("SharedGraphs")
446
+ .HasForeignKey("GraphId")
447
+ .OnDelete(DeleteBehavior.Cascade)
448
+ .IsRequired();
449
+
450
+ b.HasOne("FlowAPI.Domain.Entities.User", "SharedWithUser")
451
+ .WithMany("SharedGraphs")
452
+ .HasForeignKey("SharedWithUserId")
453
+ .OnDelete(DeleteBehavior.Cascade)
454
+ .IsRequired();
455
+
456
+ b.Navigation("Graph");
457
+
458
+ b.Navigation("SharedWithUser");
459
+ });
460
+
461
+ modelBuilder.Entity("FlowAPI.Domain.Entities.TaskNode", b =>
462
+ {
463
+ b.HasOne("FlowAPI.Domain.Entities.Graph", "Graph")
464
+ .WithMany("Nodes")
465
+ .HasForeignKey("GraphId")
466
+ .OnDelete(DeleteBehavior.Cascade)
467
+ .IsRequired();
468
+
469
+ b.Navigation("Graph");
470
+ });
471
+
472
+ modelBuilder.Entity("FlowAPI.Domain.Entities.UserAchievement", b =>
473
+ {
474
+ b.HasOne("FlowAPI.Domain.Entities.Achievement", "Achievement")
475
+ .WithMany()
476
+ .HasForeignKey("AchievementId")
477
+ .OnDelete(DeleteBehavior.Cascade)
478
+ .IsRequired();
479
+
480
+ b.HasOne("FlowAPI.Domain.Entities.User", "User")
481
+ .WithMany("UserAchievements")
482
+ .HasForeignKey("UserId")
483
+ .OnDelete(DeleteBehavior.Cascade)
484
+ .IsRequired();
485
+
486
+ b.Navigation("Achievement");
487
+
488
+ b.Navigation("User");
489
+ });
490
+
491
+ modelBuilder.Entity("FlowAPI.Domain.Entities.Graph", b =>
492
+ {
493
+ b.Navigation("Edges");
494
+
495
+ b.Navigation("Nodes");
496
+
497
+ b.Navigation("SharedGraphs");
498
+ });
499
+
500
+ modelBuilder.Entity("FlowAPI.Domain.Entities.TaskNode", b =>
501
+ {
502
+ b.Navigation("IncomingEdges");
503
+
504
+ b.Navigation("OutgoingEdges");
505
+ });
506
+
507
+ modelBuilder.Entity("FlowAPI.Domain.Entities.User", b =>
508
+ {
509
+ b.Navigation("Graphs");
510
+
511
+ b.Navigation("HabitRecords");
512
+
513
+ b.Navigation("SharedGraphs");
514
+
515
+ b.Navigation("UserAchievements");
516
+ });
517
+ #pragma warning restore 612, 618
518
+ }
519
+ }
520
+ }
FlowAPI.Infrastructure/Migrations/20261111224418_AddNodeGroups.cs ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using Microsoft.EntityFrameworkCore.Migrations;
3
+
4
+ #nullable disable
5
+
6
+ namespace FlowAPI.Infrastructure.Migrations
7
+ {
8
+ /// <inheritdoc />
9
+ public partial class AddNodeGroups : Migration
10
+ {
11
+ /// <inheritdoc />
12
+ protected override void Up(MigrationBuilder migrationBuilder)
13
+ {
14
+ migrationBuilder.AddColumn<Guid>(
15
+ name: "GroupId",
16
+ table: "TaskNodes",
17
+ type: "TEXT",
18
+ nullable: true);
19
+ }
20
+
21
+ /// <inheritdoc />
22
+ protected override void Down(MigrationBuilder migrationBuilder)
23
+ {
24
+ migrationBuilder.DropColumn(
25
+ name: "GroupId",
26
+ table: "TaskNodes");
27
+ }
28
+ }
29
+ }
FlowAPI.Infrastructure/Migrations/AppDbContextModelSnapshot.cs CHANGED
@@ -253,6 +253,9 @@ namespace FlowAPI.Infrastructure.Migrations
253
  b.Property<Guid>("GraphId")
254
  .HasColumnType("TEXT");
255
 
 
 
 
256
  b.Property<double?>("Height")
257
  .HasColumnType("REAL");
258
 
 
253
  b.Property<Guid>("GraphId")
254
  .HasColumnType("TEXT");
255
 
256
+ b.Property<Guid?>("GroupId")
257
+ .HasColumnType("TEXT");
258
+
259
  b.Property<double?>("Height")
260
  .HasColumnType("REAL");
261
 
FlowAPI.Infrastructure/Repositories/GraphRepository.cs CHANGED
@@ -100,6 +100,7 @@ namespace FlowAPI.Infrastructure.Repositories
100
  existingNode.IsPinned = node.IsPinned;
101
  existingNode.Width = node.Width;
102
  existingNode.Height = node.Height;
 
103
  if (node.Data != null)
104
  {
105
  existingNode.Data = node.Data;
 
100
  existingNode.IsPinned = node.IsPinned;
101
  existingNode.Width = node.Width;
102
  existingNode.Height = node.Height;
103
+ existingNode.GroupId = node.GroupId;
104
  if (node.Data != null)
105
  {
106
  existingNode.Data = node.Data;