Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 5f000cb0

Přidáno uživatelem Vojtěch Bartička před asi 2 roky(ů)

Added database migration

Zobrazit rozdíly:

Backend/Backend/Migrations/DatabaseContextModelSnapshot.cs
37 37
                    b.ToTable("AnnotationClass");
38 38
                });
39 39

  
40
            modelBuilder.Entity("AnnotationFinalAnnotation", b =>
41
                {
42
                    b.Property<Guid>("AnnotationsId")
43
                        .HasColumnType("uuid");
44

  
45
                    b.Property<Guid>("FinalAnnotationsId")
46
                        .HasColumnType("uuid");
47

  
48
                    b.HasKey("AnnotationsId", "FinalAnnotationsId");
49

  
50
                    b.HasIndex("FinalAnnotationsId");
51

  
52
                    b.ToTable("AnnotationFinalAnnotation");
53
                });
54

  
40 55
            modelBuilder.Entity("Core.Entities.Annotation", b =>
41 56
                {
42 57
                    b.Property<Guid>("Id")
43 58
                        .ValueGeneratedOnAdd()
44 59
                        .HasColumnType("uuid");
45 60

  
61
                    b.Property<string>("CachedCSS")
62
                        .IsRequired()
63
                        .HasColumnType("text");
64

  
65
                    b.Property<string>("CachedClosingLengths")
66
                        .IsRequired()
67
                        .HasColumnType("text");
68

  
69
                    b.Property<string>("CachedClosingPositions")
70
                        .IsRequired()
71
                        .HasColumnType("text");
72

  
73
                    b.Property<string>("CachedDocumentHTML")
74
                        .IsRequired()
75
                        .HasColumnType("text");
76

  
77
                    b.Property<string>("CachedLengths")
78
                        .IsRequired()
79
                        .HasColumnType("text");
80

  
81
                    b.Property<string>("CachedStartPositions")
82
                        .IsRequired()
83
                        .HasColumnType("text");
84

  
46 85
                    b.Property<DateTime>("DateAssigned")
47 86
                        .HasColumnType("timestamp with time zone");
48 87

  
49 88
                    b.Property<DateTime>("DateLastChanged")
50 89
                        .HasColumnType("timestamp with time zone");
51 90

  
91
                    b.Property<string>("Discriminator")
92
                        .IsRequired()
93
                        .HasColumnType("text");
94

  
52 95
                    b.Property<Guid>("DocumentId")
53 96
                        .HasColumnType("uuid");
54 97

  
98
                    b.Property<Guid?>("LastModifiedTagId")
99
                        .HasColumnType("uuid");
100

  
101
                    b.Property<int>("ModifiedType")
102
                        .HasColumnType("integer");
103

  
55 104
                    b.Property<string>("Note")
56 105
                        .IsRequired()
57 106
                        .HasColumnType("text");
......
74 123
                    b.HasIndex("UserId");
75 124

  
76 125
                    b.ToTable("Annotations");
126

  
127
                    b.HasDiscriminator<string>("Discriminator").HasValue("Annotation");
77 128
                });
78 129

  
79 130
            modelBuilder.Entity("Core.Entities.AnnotationTag", b =>
......
98 149
                    b.Property<int>("Position")
99 150
                        .HasColumnType("integer");
100 151

  
152
                    b.Property<string>("SelectedText")
153
                        .IsRequired()
154
                        .HasColumnType("text");
155

  
156
                    b.Property<int?>("Sentiment")
157
                        .HasColumnType("integer");
158

  
101 159
                    b.Property<Guid?>("SubTagId")
102 160
                        .HasColumnType("uuid");
103 161

  
......
205 263
                    b.ToTable("DocumentContents");
206 264
                });
207 265

  
266
            modelBuilder.Entity("Core.Entities.FinalAnnotationTag", b =>
267
                {
268
                    b.Property<Guid>("Id")
269
                        .ValueGeneratedOnAdd()
270
                        .HasColumnType("uuid");
271

  
272
                    b.Property<Guid>("AnnotationId")
273
                        .HasColumnType("uuid");
274

  
275
                    b.Property<Guid>("Instance")
276
                        .HasColumnType("uuid");
277

  
278
                    b.Property<bool>("IsFinal")
279
                        .HasColumnType("boolean");
280

  
281
                    b.Property<int>("Length")
282
                        .HasColumnType("integer");
283

  
284
                    b.Property<string>("Note")
285
                        .IsRequired()
286
                        .HasColumnType("text");
287

  
288
                    b.Property<int>("Position")
289
                        .HasColumnType("integer");
290

  
291
                    b.Property<string>("SelectedText")
292
                        .IsRequired()
293
                        .HasColumnType("text");
294

  
295
                    b.Property<int?>("Sentiment")
296
                        .HasColumnType("integer");
297

  
298
                    b.Property<Guid?>("SubTagId")
299
                        .HasColumnType("uuid");
300

  
301
                    b.Property<Guid>("TagId")
302
                        .HasColumnType("uuid");
303

  
304
                    b.HasKey("Id");
305

  
306
                    b.HasIndex("AnnotationId");
307

  
308
                    b.HasIndex("SubTagId");
309

  
310
                    b.HasIndex("TagId");
311

  
312
                    b.ToTable("FinalAnnotationTags");
313
                });
314

  
208 315
            modelBuilder.Entity("Core.Entities.SubTag", b =>
209 316
                {
210 317
                    b.Property<Guid>("Id")
......
219 326
                        .IsRequired()
220 327
                        .HasColumnType("text");
221 328

  
329
                    b.Property<bool>("SentimentEnabled")
330
                        .HasColumnType("boolean");
331

  
222 332
                    b.Property<Guid>("TagId")
223 333
                        .HasColumnType("uuid");
224 334

  
......
250 360
                        .IsRequired()
251 361
                        .HasColumnType("text");
252 362

  
363
                    b.Property<bool>("SentimentEnabled")
364
                        .HasColumnType("boolean");
365

  
253 366
                    b.HasKey("Id");
254 367

  
255 368
                    b.HasIndex("CategoryId");
......
269 382
                    b.Property<string>("Description")
270 383
                        .HasColumnType("text");
271 384

  
385
                    b.Property<bool>("DisabledForAnnotators")
386
                        .HasColumnType("boolean");
387

  
272 388
                    b.Property<string>("Name")
273 389
                        .HasColumnType("text");
274 390

  
......
303 419
                    b.ToTable("Users");
304 420
                });
305 421

  
422
            modelBuilder.Entity("FinalAnnotationTagUser", b =>
423
                {
424
                    b.Property<Guid>("FinalAnnotationTagsId")
425
                        .HasColumnType("uuid");
426

  
427
                    b.Property<Guid>("UsersId")
428
                        .HasColumnType("uuid");
429

  
430
                    b.HasKey("FinalAnnotationTagsId", "UsersId");
431

  
432
                    b.HasIndex("UsersId");
433

  
434
                    b.ToTable("FinalAnnotationTagUser");
435
                });
436

  
437
            modelBuilder.Entity("Core.Entities.FinalAnnotation", b =>
438
                {
439
                    b.HasBaseType("Core.Entities.Annotation");
440

  
441
                    b.HasDiscriminator().HasValue("FinalAnnotation");
442
                });
443

  
306 444
            modelBuilder.Entity("AnnotationClass", b =>
307 445
                {
308 446
                    b.HasOne("Core.Entities.Annotation", null)
......
318 456
                        .IsRequired();
319 457
                });
320 458

  
459
            modelBuilder.Entity("AnnotationFinalAnnotation", b =>
460
                {
461
                    b.HasOne("Core.Entities.Annotation", null)
462
                        .WithMany()
463
                        .HasForeignKey("AnnotationsId")
464
                        .OnDelete(DeleteBehavior.Cascade)
465
                        .IsRequired();
466

  
467
                    b.HasOne("Core.Entities.FinalAnnotation", null)
468
                        .WithMany()
469
                        .HasForeignKey("FinalAnnotationsId")
470
                        .OnDelete(DeleteBehavior.Cascade)
471
                        .IsRequired();
472
                });
473

  
321 474
            modelBuilder.Entity("Core.Entities.Annotation", b =>
322 475
                {
323 476
                    b.HasOne("Core.Entities.Document", "Document")
......
385 538
                    b.Navigation("UserAdded");
386 539
                });
387 540

  
541
            modelBuilder.Entity("Core.Entities.FinalAnnotationTag", b =>
542
                {
543
                    b.HasOne("Core.Entities.FinalAnnotation", "Annotation")
544
                        .WithMany()
545
                        .HasForeignKey("AnnotationId")
546
                        .OnDelete(DeleteBehavior.Cascade)
547
                        .IsRequired();
548

  
549
                    b.HasOne("Core.Entities.SubTag", "SubTag")
550
                        .WithMany()
551
                        .HasForeignKey("SubTagId");
552

  
553
                    b.HasOne("Core.Entities.Tag", "Tag")
554
                        .WithMany()
555
                        .HasForeignKey("TagId")
556
                        .OnDelete(DeleteBehavior.Cascade)
557
                        .IsRequired();
558

  
559
                    b.Navigation("Annotation");
560

  
561
                    b.Navigation("SubTag");
562

  
563
                    b.Navigation("Tag");
564
                });
565

  
388 566
            modelBuilder.Entity("Core.Entities.SubTag", b =>
389 567
                {
390 568
                    b.HasOne("Core.Entities.Tag", "Tag")
......
406 584

  
407 585
                    b.Navigation("Category");
408 586
                });
587

  
588
            modelBuilder.Entity("FinalAnnotationTagUser", b =>
589
                {
590
                    b.HasOne("Core.Entities.FinalAnnotationTag", null)
591
                        .WithMany()
592
                        .HasForeignKey("FinalAnnotationTagsId")
593
                        .OnDelete(DeleteBehavior.Cascade)
594
                        .IsRequired();
595

  
596
                    b.HasOne("Core.Entities.User", null)
597
                        .WithMany()
598
                        .HasForeignKey("UsersId")
599
                        .OnDelete(DeleteBehavior.Cascade)
600
                        .IsRequired();
601
                });
409 602
#pragma warning restore 612, 618
410 603
        }
411 604
    }

Také k dispozici: Unified diff