Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 166cb9e9

Přidáno uživatelem Milan Hotovec před téměř 4 roky(ů)

Completed data layer with migrations. With flags

Zobrazit rozdíly:

src/Core/Infrastructure/Leuze.Core.Infrastructure.Persistence/Migrations/20210513145537_Added-GlobalArea.Designer.cs
1
// <auto-generated />
2
using System;
3
using Leuze.Core.Infrastructure.Persistence;
4
using Microsoft.EntityFrameworkCore;
5
using Microsoft.EntityFrameworkCore.Infrastructure;
6
using Microsoft.EntityFrameworkCore.Metadata;
7
using Microsoft.EntityFrameworkCore.Migrations;
8
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
9

  
10
namespace Leuze.Core.Infrastructure.Persistence.Migrations
11
{
12
    [DbContext(typeof(LeuzeDbContext))]
13
    [Migration("20210513145537_Added-GlobalArea")]
14
    partial class AddedGlobalArea
15
    {
16
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
17
        {
18
#pragma warning disable 612, 618
19
            modelBuilder
20
                .HasAnnotation("Relational:MaxIdentifierLength", 128)
21
                .HasAnnotation("ProductVersion", "5.0.4")
22
                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
23

  
24
            modelBuilder.Entity("ApplicationPermissionApplicationRole", b =>
25
                {
26
                    b.Property<Guid>("PermissionsId")
27
                        .HasColumnType("uniqueidentifier");
28

  
29
                    b.Property<Guid>("RolesId")
30
                        .HasColumnType("uniqueidentifier");
31

  
32
                    b.HasKey("PermissionsId", "RolesId");
33

  
34
                    b.HasIndex("RolesId");
35

  
36
                    b.ToTable("Leuze_Roles_Assigned_Permissions");
37
                });
38

  
39
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationPermission", b =>
40
                {
41
                    b.Property<Guid>("Id")
42
                        .ValueGeneratedOnAdd()
43
                        .HasColumnType("uniqueidentifier");
44

  
45
                    b.Property<string>("Module")
46
                        .IsRequired()
47
                        .HasMaxLength(512)
48
                        .HasColumnType("nvarchar(512)");
49

  
50
                    b.Property<string>("Name")
51
                        .IsRequired()
52
                        .HasMaxLength(512)
53
                        .HasColumnType("nvarchar(512)");
54

  
55
                    b.Property<string>("Privilege")
56
                        .IsRequired()
57
                        .HasMaxLength(2048)
58
                        .HasColumnType("nvarchar(2048)");
59

  
60
                    b.HasKey("Id");
61

  
62
                    b.ToTable("Leuze_Application_Permissions");
63
                });
64

  
65
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationRole", b =>
66
                {
67
                    b.Property<Guid>("Id")
68
                        .ValueGeneratedOnAdd()
69
                        .HasColumnType("uniqueidentifier");
70

  
71
                    b.Property<string>("ConcurrencyStamp")
72
                        .IsConcurrencyToken()
73
                        .HasColumnType("nvarchar(max)");
74

  
75
                    b.Property<bool>("IsDefault")
76
                        .HasColumnType("bit");
77

  
78
                    b.Property<string>("Name")
79
                        .HasMaxLength(256)
80
                        .HasColumnType("nvarchar(256)");
81

  
82
                    b.Property<string>("NormalizedName")
83
                        .HasMaxLength(256)
84
                        .HasColumnType("nvarchar(256)");
85

  
86
                    b.HasKey("Id");
87

  
88
                    b.HasIndex("NormalizedName")
89
                        .IsUnique()
90
                        .HasDatabaseName("RoleNameIndex")
91
                        .HasFilter("[NormalizedName] IS NOT NULL");
92

  
93
                    b.ToTable("Leuze_Roles");
94
                });
95

  
96
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationRoleClaim", b =>
97
                {
98
                    b.Property<int>("Id")
99
                        .ValueGeneratedOnAdd()
100
                        .HasColumnType("int")
101
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
102

  
103
                    b.Property<string>("ClaimType")
104
                        .HasColumnType("nvarchar(max)");
105

  
106
                    b.Property<string>("ClaimValue")
107
                        .HasColumnType("nvarchar(max)");
108

  
109
                    b.Property<Guid>("RoleId")
110
                        .HasColumnType("uniqueidentifier");
111

  
112
                    b.HasKey("Id");
113

  
114
                    b.HasIndex("RoleId");
115

  
116
                    b.ToTable("AspNetRoleClaims");
117
                });
118

  
119
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUser", b =>
120
                {
121
                    b.Property<Guid>("Id")
122
                        .ValueGeneratedOnAdd()
123
                        .HasColumnType("uniqueidentifier");
124

  
125
                    b.Property<int>("AccessFailedCount")
126
                        .HasColumnType("int");
127

  
128
                    b.Property<string>("ConcurrencyStamp")
129
                        .IsConcurrencyToken()
130
                        .HasColumnType("nvarchar(max)");
131

  
132
                    b.Property<string>("Email")
133
                        .HasMaxLength(256)
134
                        .HasColumnType("nvarchar(256)");
135

  
136
                    b.Property<bool>("EmailConfirmed")
137
                        .HasColumnType("bit");
138

  
139
                    b.Property<bool>("IsAdUser")
140
                        .HasColumnType("bit");
141

  
142
                    b.Property<bool>("LockoutEnabled")
143
                        .HasColumnType("bit");
144

  
145
                    b.Property<DateTimeOffset?>("LockoutEnd")
146
                        .HasColumnType("datetimeoffset");
147

  
148
                    b.Property<string>("NormalizedEmail")
149
                        .HasMaxLength(256)
150
                        .HasColumnType("nvarchar(256)");
151

  
152
                    b.Property<string>("NormalizedUserName")
153
                        .HasMaxLength(256)
154
                        .HasColumnType("nvarchar(256)");
155

  
156
                    b.Property<string>("PasswordHash")
157
                        .HasColumnType("nvarchar(max)");
158

  
159
                    b.Property<string>("PhoneNumber")
160
                        .HasColumnType("nvarchar(max)");
161

  
162
                    b.Property<bool>("PhoneNumberConfirmed")
163
                        .HasColumnType("bit");
164

  
165
                    b.Property<string>("SecurityStamp")
166
                        .HasColumnType("nvarchar(max)");
167

  
168
                    b.Property<bool>("TwoFactorEnabled")
169
                        .HasColumnType("bit");
170

  
171
                    b.Property<string>("UserName")
172
                        .HasMaxLength(256)
173
                        .HasColumnType("nvarchar(256)");
174

  
175
                    b.HasKey("Id");
176

  
177
                    b.HasIndex("NormalizedEmail")
178
                        .HasDatabaseName("EmailIndex");
179

  
180
                    b.HasIndex("NormalizedUserName")
181
                        .IsUnique()
182
                        .HasDatabaseName("UserNameIndex")
183
                        .HasFilter("[NormalizedUserName] IS NOT NULL");
184

  
185
                    b.ToTable("Leuze_Users");
186
                });
187

  
188
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserClaim", b =>
189
                {
190
                    b.Property<int>("Id")
191
                        .ValueGeneratedOnAdd()
192
                        .HasColumnType("int")
193
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
194

  
195
                    b.Property<string>("ClaimType")
196
                        .HasColumnType("nvarchar(max)");
197

  
198
                    b.Property<string>("ClaimValue")
199
                        .HasColumnType("nvarchar(max)");
200

  
201
                    b.Property<Guid>("UserId")
202
                        .HasColumnType("uniqueidentifier");
203

  
204
                    b.HasKey("Id");
205

  
206
                    b.HasIndex("UserId");
207

  
208
                    b.ToTable("AspNetUserClaims");
209
                });
210

  
211
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserLogin", b =>
212
                {
213
                    b.Property<string>("LoginProvider")
214
                        .HasColumnType("nvarchar(450)");
215

  
216
                    b.Property<string>("ProviderKey")
217
                        .HasColumnType("nvarchar(450)");
218

  
219
                    b.Property<string>("ProviderDisplayName")
220
                        .HasColumnType("nvarchar(max)");
221

  
222
                    b.Property<Guid>("UserId")
223
                        .HasColumnType("uniqueidentifier");
224

  
225
                    b.HasKey("LoginProvider", "ProviderKey");
226

  
227
                    b.HasIndex("UserId");
228

  
229
                    b.ToTable("AspNetUserLogins");
230
                });
231

  
232
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserRole", b =>
233
                {
234
                    b.Property<Guid>("UserId")
235
                        .HasColumnType("uniqueidentifier");
236

  
237
                    b.Property<Guid>("RoleId")
238
                        .HasColumnType("uniqueidentifier");
239

  
240
                    b.HasKey("UserId", "RoleId");
241

  
242
                    b.HasIndex("RoleId");
243

  
244
                    b.ToTable("AspNetUserRoles");
245
                });
246

  
247
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserToken", b =>
248
                {
249
                    b.Property<Guid>("UserId")
250
                        .HasColumnType("uniqueidentifier");
251

  
252
                    b.Property<string>("LoginProvider")
253
                        .HasColumnType("nvarchar(450)");
254

  
255
                    b.Property<string>("Name")
256
                        .HasColumnType("nvarchar(450)");
257

  
258
                    b.Property<string>("Value")
259
                        .HasColumnType("nvarchar(max)");
260

  
261
                    b.HasKey("UserId", "LoginProvider", "Name");
262

  
263
                    b.ToTable("AspNetUserTokens");
264
                });
265

  
266
            modelBuilder.Entity("Leuze.Core.Domain.Domains.Users.DomainUser", b =>
267
                {
268
                    b.Property<Guid>("UserId")
269
                        .HasColumnType("uniqueidentifier");
270

  
271
                    b.Property<Guid?>("SeniorUserId")
272
                        .HasColumnType("uniqueidentifier");
273

  
274
                    b.HasKey("UserId");
275

  
276
                    b.HasIndex("SeniorUserId");
277

  
278
                    b.ToTable("Leuze_Domain_Users");
279
                });
280

  
281
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.Comment", b =>
282
                {
283
                    b.Property<Guid>("Id")
284
                        .ValueGeneratedOnAdd()
285
                        .HasColumnType("uniqueidentifier");
286

  
287
                    b.Property<Guid>("CreatorId")
288
                        .HasColumnType("uniqueidentifier");
289

  
290
                    b.Property<Guid>("GoalId")
291
                        .HasColumnType("uniqueidentifier");
292

  
293
                    b.Property<bool>("IsChanged")
294
                        .HasColumnType("bit");
295

  
296
                    b.Property<bool>("IsPrivate")
297
                        .HasColumnType("bit");
298

  
299
                    b.Property<string>("Text")
300
                        .IsRequired()
301
                        .HasColumnType("nvarchar(max)");
302

  
303
                    b.HasKey("Id");
304

  
305
                    b.HasIndex("CreatorId");
306

  
307
                    b.HasIndex("GoalId");
308

  
309
                    b.ToTable("Leuze_Modules_Goal_Domain_Comments");
310
                });
311

  
312
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GlobalDefinitionArea", b =>
313
                {
314
                    b.Property<Guid>("Id")
315
                        .ValueGeneratedOnAdd()
316
                        .HasColumnType("uniqueidentifier");
317

  
318
                    b.Property<Guid>("CreatorId")
319
                        .HasColumnType("uniqueidentifier");
320

  
321
                    b.Property<DateTime>("From")
322
                        .HasColumnType("datetime2");
323

  
324
                    b.Property<DateTime>("To")
325
                        .HasColumnType("datetime2");
326

  
327
                    b.Property<double?>("VariCompanySuccess")
328
                        .HasColumnType("float");
329

  
330
                    b.HasKey("Id");
331

  
332
                    b.HasIndex("CreatorId");
333

  
334
                    b.ToTable("Leuze_Modules_Goal_Domain_GoalDefinitionAreas");
335
                });
336

  
337
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GoalDefinition", b =>
338
                {
339
                    b.Property<Guid>("Id")
340
                        .ValueGeneratedOnAdd()
341
                        .HasColumnType("uniqueidentifier");
342

  
343
                    b.Property<Guid>("CreatorId")
344
                        .HasColumnType("uniqueidentifier");
345

  
346
                    b.Property<double>("FinanceBase")
347
                        .HasColumnType("float");
348

  
349
                    b.Property<Guid>("GDAreaId")
350
                        .HasColumnType("uniqueidentifier");
351

  
352
                    b.Property<string>("Name")
353
                        .IsRequired()
354
                        .HasMaxLength(255)
355
                        .HasColumnType("nvarchar(255)");
356

  
357
                    b.Property<Guid>("OwnerId")
358
                        .HasColumnType("uniqueidentifier");
359

  
360
                    b.Property<bool>("OwnerLocked")
361
                        .HasColumnType("bit");
362

  
363
                    b.Property<bool>("SupervisorLocked")
364
                        .HasColumnType("bit");
365

  
366
                    b.Property<double?>("VariProjectHours")
367
                        .HasColumnType("float");
368

  
369
                    b.HasKey("Id");
370

  
371
                    b.HasIndex("CreatorId");
372

  
373
                    b.HasIndex("GDAreaId");
374

  
375
                    b.HasIndex("OwnerId");
376

  
377
                    b.ToTable("Leuze_Modules_Goal_Domain_GoalDefinitions");
378
                });
379

  
380
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GoalItem", b =>
381
                {
382
                    b.Property<Guid>("Id")
383
                        .ValueGeneratedOnAdd()
384
                        .HasColumnType("uniqueidentifier");
385

  
386
                    b.Property<Guid>("CreatorId")
387
                        .HasColumnType("uniqueidentifier");
388

  
389
                    b.Property<string>("Description")
390
                        .IsRequired()
391
                        .HasColumnType("nvarchar(max)");
392

  
393
                    b.Property<Guid>("GoalDefinitionId")
394
                        .HasColumnType("uniqueidentifier");
395

  
396
                    b.Property<string>("Name")
397
                        .IsRequired()
398
                        .HasMaxLength(255)
399
                        .HasColumnType("nvarchar(255)");
400

  
401
                    b.Property<double>("PercentileFinal")
402
                        .HasColumnType("float");
403

  
404
                    b.Property<double>("PercentileUser")
405
                        .HasColumnType("float");
406

  
407
                    b.HasKey("Id");
408

  
409
                    b.HasIndex("CreatorId");
410

  
411
                    b.HasIndex("GoalDefinitionId");
412

  
413
                    b.ToTable("Leuze_Modules_Goal_Domain_GoalItems");
414
                });
415

  
416
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GoalUpdate", b =>
417
                {
418
                    b.Property<Guid>("Id")
419
                        .ValueGeneratedOnAdd()
420
                        .HasColumnType("uniqueidentifier");
421

  
422
                    b.Property<Guid>("CreatorId")
423
                        .HasColumnType("uniqueidentifier");
424

  
425
                    b.Property<Guid>("GoalId")
426
                        .HasColumnType("uniqueidentifier");
427

  
428
                    b.Property<string>("NewValue")
429
                        .IsRequired()
430
                        .HasColumnType("nvarchar(max)");
431

  
432
                    b.Property<string>("OldValue")
433
                        .IsRequired()
434
                        .HasColumnType("nvarchar(max)");
435

  
436
                    b.Property<int>("UpdatedType")
437
                        .HasColumnType("int");
438

  
439
                    b.HasKey("Id");
440

  
441
                    b.HasIndex("CreatorId");
442

  
443
                    b.HasIndex("GoalId");
444

  
445
                    b.ToTable("Leuze_Modules_Goal_Domain_GoalUpdates");
446
                });
447

  
448
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.Review", b =>
449
                {
450
                    b.Property<Guid>("Id")
451
                        .ValueGeneratedOnAdd()
452
                        .HasColumnType("uniqueidentifier");
453

  
454
                    b.Property<string>("CommentCreator")
455
                        .IsRequired()
456
                        .HasColumnType("nvarchar(max)");
457

  
458
                    b.Property<string>("CommentOwner")
459
                        .IsRequired()
460
                        .HasColumnType("nvarchar(max)");
461

  
462
                    b.Property<Guid>("CreatorId")
463
                        .HasColumnType("uniqueidentifier");
464

  
465
                    b.Property<Guid>("GoalId")
466
                        .HasColumnType("uniqueidentifier");
467

  
468
                    b.Property<bool>("IsFinal")
469
                        .HasColumnType("bit");
470

  
471
                    b.HasKey("Id");
472

  
473
                    b.HasIndex("CreatorId");
474

  
475
                    b.HasIndex("GoalId");
476

  
477
                    b.ToTable("Leuze_Modules_Goal_Domain_Reviews");
478
                });
479

  
480
            modelBuilder.Entity("ApplicationPermissionApplicationRole", b =>
481
                {
482
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationPermission", null)
483
                        .WithMany()
484
                        .HasForeignKey("PermissionsId")
485
                        .OnDelete(DeleteBehavior.Cascade)
486
                        .IsRequired();
487

  
488
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationRole", null)
489
                        .WithMany()
490
                        .HasForeignKey("RolesId")
491
                        .OnDelete(DeleteBehavior.Cascade)
492
                        .IsRequired();
493
                });
494

  
495
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationRoleClaim", b =>
496
                {
497
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationRole", null)
498
                        .WithMany()
499
                        .HasForeignKey("RoleId")
500
                        .OnDelete(DeleteBehavior.Cascade)
501
                        .IsRequired();
502
                });
503

  
504
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserClaim", b =>
505
                {
506
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationUser", null)
507
                        .WithMany()
508
                        .HasForeignKey("UserId")
509
                        .OnDelete(DeleteBehavior.Cascade)
510
                        .IsRequired();
511
                });
512

  
513
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserLogin", b =>
514
                {
515
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationUser", null)
516
                        .WithMany()
517
                        .HasForeignKey("UserId")
518
                        .OnDelete(DeleteBehavior.Cascade)
519
                        .IsRequired();
520
                });
521

  
522
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserRole", b =>
523
                {
524
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationRole", "Role")
525
                        .WithMany()
526
                        .HasForeignKey("RoleId")
527
                        .OnDelete(DeleteBehavior.Cascade)
528
                        .IsRequired();
529

  
530
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationUser", "User")
531
                        .WithMany()
532
                        .HasForeignKey("UserId")
533
                        .OnDelete(DeleteBehavior.Cascade)
534
                        .IsRequired();
535

  
536
                    b.Navigation("Role");
537

  
538
                    b.Navigation("User");
539
                });
540

  
541
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserToken", b =>
542
                {
543
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationUser", null)
544
                        .WithMany()
545
                        .HasForeignKey("UserId")
546
                        .OnDelete(DeleteBehavior.Cascade)
547
                        .IsRequired();
548
                });
549

  
550
            modelBuilder.Entity("Leuze.Core.Domain.Domains.Users.DomainUser", b =>
551
                {
552
                    b.HasOne("Leuze.Core.Domain.Domains.Users.DomainUser", "SeniorUser")
553
                        .WithMany("Juniors")
554
                        .HasForeignKey("SeniorUserId");
555

  
556
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationUser", "User")
557
                        .WithOne()
558
                        .HasForeignKey("Leuze.Core.Domain.Domains.Users.DomainUser", "UserId")
559
                        .OnDelete(DeleteBehavior.Cascade)
560
                        .IsRequired();
561

  
562
                    b.OwnsOne("Leuze.Core.Domain.Domains.Shared.ValueObjects.EmailAddress", "EmailAddress", b1 =>
563
                        {
564
                            b1.Property<Guid>("DomainUserUserId")
565
                                .HasColumnType("uniqueidentifier");
566

  
567
                            b1.Property<string>("Email")
568
                                .IsRequired()
569
                                .HasMaxLength(512)
570
                                .HasColumnType("nvarchar(512)");
571

  
572
                            b1.HasKey("DomainUserUserId");
573

  
574
                            b1.ToTable("Leuze_Domain_Users");
575

  
576
                            b1.WithOwner()
577
                                .HasForeignKey("DomainUserUserId");
578
                        });
579

  
580
                    b.OwnsOne("Leuze.Core.Domain.Domains.Shared.ValueObjects.PersonFullName", "Name", b1 =>
581
                        {
582
                            b1.Property<Guid>("DomainUserUserId")
583
                                .HasColumnType("uniqueidentifier");
584

  
585
                            b1.Property<string>("FullName")
586
                                .IsRequired()
587
                                .HasMaxLength(256)
588
                                .HasColumnType("nvarchar(256)");
589

  
590
                            b1.HasKey("DomainUserUserId");
591

  
592
                            b1.ToTable("Leuze_Domain_Users");
593

  
594
                            b1.WithOwner()
595
                                .HasForeignKey("DomainUserUserId");
596
                        });
597

  
598
                    b.Navigation("EmailAddress")
599
                        .IsRequired();
600

  
601
                    b.Navigation("Name")
602
                        .IsRequired();
603

  
604
                    b.Navigation("SeniorUser");
605

  
606
                    b.Navigation("User");
607
                });
608

  
609
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.Comment", b =>
610
                {
611
                    b.HasOne("Leuze.Core.Domain.Domains.Users.DomainUser", "Creator")
612
                        .WithMany()
613
                        .HasForeignKey("CreatorId")
614
                        .OnDelete(DeleteBehavior.Cascade)
615
                        .IsRequired();
616

  
617
                    b.HasOne("Leuze.Modules.Goal.Domain.Domains.GoalItem", "Goal")
618
                        .WithMany("Comments")
619
                        .HasForeignKey("GoalId")
620
                        .OnDelete(DeleteBehavior.Cascade)
621
                        .IsRequired();
622

  
623
                    b.Navigation("Creator");
624

  
625
                    b.Navigation("Goal");
626
                });
627

  
628
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GlobalDefinitionArea", b =>
629
                {
630
                    b.HasOne("Leuze.Core.Domain.Domains.Users.DomainUser", "Creator")
631
                        .WithMany()
632
                        .HasForeignKey("CreatorId")
633
                        .OnDelete(DeleteBehavior.Cascade)
634
                        .IsRequired();
635

  
636
                    b.Navigation("Creator");
637
                });
638

  
639
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GoalDefinition", b =>
640
                {
641
                    b.HasOne("Leuze.Core.Domain.Domains.Users.DomainUser", "Creator")
642
                        .WithMany()
643
                        .HasForeignKey("CreatorId")
644
                        .OnDelete(DeleteBehavior.Cascade)
645
                        .IsRequired();
646

  
647
                    b.HasOne("Leuze.Modules.Goal.Domain.Domains.GlobalDefinitionArea", "GDArea")
648
                        .WithMany()
649
                        .HasForeignKey("GDAreaId")
650
                        .OnDelete(DeleteBehavior.Cascade)
651
                        .IsRequired();
652

  
653
                    b.HasOne("Leuze.Core.Domain.Domains.Users.DomainUser", "Owner")
654
                        .WithMany()
655
                        .HasForeignKey("OwnerId")
656
                        .OnDelete(DeleteBehavior.Cascade)
657
                        .IsRequired();
658

  
659
                    b.Navigation("Creator");
660

  
661
                    b.Navigation("GDArea");
662

  
663
                    b.Navigation("Owner");
664
                });
665

  
666
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GoalItem", b =>
667
                {
668
                    b.HasOne("Leuze.Core.Domain.Domains.Users.DomainUser", "Creator")
669
                        .WithMany()
670
                        .HasForeignKey("CreatorId")
671
                        .OnDelete(DeleteBehavior.Cascade)
672
                        .IsRequired();
673

  
674
                    b.HasOne("Leuze.Modules.Goal.Domain.Domains.GoalDefinition", "GoalDefinition")
675
                        .WithMany("Goals")
676
                        .HasForeignKey("GoalDefinitionId")
677
                        .OnDelete(DeleteBehavior.Cascade)
678
                        .IsRequired();
679

  
680
                    b.Navigation("Creator");
681

  
682
                    b.Navigation("GoalDefinition");
683
                });
684

  
685
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GoalUpdate", b =>
686
                {
687
                    b.HasOne("Leuze.Core.Domain.Domains.Users.DomainUser", "Creator")
688
                        .WithMany()
689
                        .HasForeignKey("CreatorId")
690
                        .OnDelete(DeleteBehavior.Cascade)
691
                        .IsRequired();
692

  
693
                    b.HasOne("Leuze.Modules.Goal.Domain.Domains.GoalItem", "Goal")
694
                        .WithMany("Updates")
695
                        .HasForeignKey("GoalId")
696
                        .OnDelete(DeleteBehavior.Cascade)
697
                        .IsRequired();
698

  
699
                    b.Navigation("Creator");
700

  
701
                    b.Navigation("Goal");
702
                });
703

  
704
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.Review", b =>
705
                {
706
                    b.HasOne("Leuze.Core.Domain.Domains.Users.DomainUser", "Creator")
707
                        .WithMany()
708
                        .HasForeignKey("CreatorId")
709
                        .OnDelete(DeleteBehavior.Cascade)
710
                        .IsRequired();
711

  
712
                    b.HasOne("Leuze.Modules.Goal.Domain.Domains.GoalItem", "Goal")
713
                        .WithMany("Reviews")
714
                        .HasForeignKey("GoalId")
715
                        .OnDelete(DeleteBehavior.Cascade)
716
                        .IsRequired();
717

  
718
                    b.Navigation("Creator");
719

  
720
                    b.Navigation("Goal");
721
                });
722

  
723
            modelBuilder.Entity("Leuze.Core.Domain.Domains.Users.DomainUser", b =>
724
                {
725
                    b.Navigation("Juniors");
726
                });
727

  
728
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GoalDefinition", b =>
729
                {
730
                    b.Navigation("Goals");
731
                });
732

  
733
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GoalItem", b =>
734
                {
735
                    b.Navigation("Comments");
736

  
737
                    b.Navigation("Reviews");
738

  
739
                    b.Navigation("Updates");
740
                });
741
#pragma warning restore 612, 618
742
        }
743
    }
744
}
src/Core/Infrastructure/Leuze.Core.Infrastructure.Persistence/Migrations/20210513145537_Added-GlobalArea.cs
1
using System;
2
using Microsoft.EntityFrameworkCore.Migrations;
3

  
4
namespace Leuze.Core.Infrastructure.Persistence.Migrations
5
{
6
    public partial class AddedGlobalArea : Migration
7
    {
8
        protected override void Up(MigrationBuilder migrationBuilder)
9
        {
10
            migrationBuilder.DropColumn(
11
                name: "From",
12
                table: "Leuze_Modules_Goal_Domain_GoalDefinitions");
13

  
14
            migrationBuilder.DropColumn(
15
                name: "To",
16
                table: "Leuze_Modules_Goal_Domain_GoalDefinitions");
17

  
18
            migrationBuilder.DropColumn(
19
                name: "Vari",
20
                table: "Leuze_Modules_Goal_Domain_GoalDefinitions");
21

  
22
            migrationBuilder.AlterColumn<double>(
23
                name: "PercentileUser",
24
                table: "Leuze_Modules_Goal_Domain_GoalItems",
25
                type: "float",
26
                nullable: false,
27
                oldClrType: typeof(decimal),
28
                oldType: "decimal(18,2)");
29

  
30
            migrationBuilder.AlterColumn<double>(
31
                name: "PercentileFinal",
32
                table: "Leuze_Modules_Goal_Domain_GoalItems",
33
                type: "float",
34
                nullable: false,
35
                oldClrType: typeof(decimal),
36
                oldType: "decimal(18,2)");
37

  
38
            migrationBuilder.AddColumn<double>(
39
                name: "FinanceBase",
40
                table: "Leuze_Modules_Goal_Domain_GoalDefinitions",
41
                type: "float",
42
                nullable: false,
43
                defaultValue: 0.0);
44

  
45
            migrationBuilder.AddColumn<Guid>(
46
                name: "GDAreaId",
47
                table: "Leuze_Modules_Goal_Domain_GoalDefinitions",
48
                type: "uniqueidentifier",
49
                nullable: false,
50
                defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
51

  
52
            migrationBuilder.AddColumn<double>(
53
                name: "VariProjectHours",
54
                table: "Leuze_Modules_Goal_Domain_GoalDefinitions",
55
                type: "float",
56
                nullable: true);
57

  
58
            migrationBuilder.CreateTable(
59
                name: "Leuze_Modules_Goal_Domain_GoalDefinitionAreas",
60
                columns: table => new
61
                {
62
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
63
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
64
                    From = table.Column<DateTime>(type: "datetime2", nullable: false),
65
                    To = table.Column<DateTime>(type: "datetime2", nullable: false),
66
                    VariCompanySuccess = table.Column<double>(type: "float", nullable: true)
67
                },
68
                constraints: table =>
69
                {
70
                    table.PrimaryKey("PK_Leuze_Modules_Goal_Domain_GoalDefinitionAreas", x => x.Id);
71
                    table.ForeignKey(
72
                        name: "FK_Leuze_Modules_Goal_Domain_GoalDefinitionAreas_Leuze_Domain_Users_CreatorId",
73
                        column: x => x.CreatorId,
74
                        principalTable: "Leuze_Domain_Users",
75
                        principalColumn: "UserId",
76
                        onDelete: ReferentialAction.Cascade);
77
                });
78

  
79
            migrationBuilder.CreateIndex(
80
                name: "IX_Leuze_Modules_Goal_Domain_GoalDefinitions_GDAreaId",
81
                table: "Leuze_Modules_Goal_Domain_GoalDefinitions",
82
                column: "GDAreaId");
83

  
84
            migrationBuilder.CreateIndex(
85
                name: "IX_Leuze_Modules_Goal_Domain_GoalDefinitionAreas_CreatorId",
86
                table: "Leuze_Modules_Goal_Domain_GoalDefinitionAreas",
87
                column: "CreatorId");
88

  
89
            migrationBuilder.AddForeignKey(
90
                name: "FK_Leuze_Modules_Goal_Domain_GoalDefinitions_Leuze_Modules_Goal_Domain_GoalDefinitionAreas_GDAreaId",
91
                table: "Leuze_Modules_Goal_Domain_GoalDefinitions",
92
                column: "GDAreaId",
93
                principalTable: "Leuze_Modules_Goal_Domain_GoalDefinitionAreas",
94
                principalColumn: "Id",
95
                onDelete: ReferentialAction.Cascade);
96
        }
97

  
98
        protected override void Down(MigrationBuilder migrationBuilder)
99
        {
100
            migrationBuilder.DropForeignKey(
101
                name: "FK_Leuze_Modules_Goal_Domain_GoalDefinitions_Leuze_Modules_Goal_Domain_GoalDefinitionAreas_GDAreaId",
102
                table: "Leuze_Modules_Goal_Domain_GoalDefinitions");
103

  
104
            migrationBuilder.DropTable(
105
                name: "Leuze_Modules_Goal_Domain_GoalDefinitionAreas");
106

  
107
            migrationBuilder.DropIndex(
108
                name: "IX_Leuze_Modules_Goal_Domain_GoalDefinitions_GDAreaId",
109
                table: "Leuze_Modules_Goal_Domain_GoalDefinitions");
110

  
111
            migrationBuilder.DropColumn(
112
                name: "FinanceBase",
113
                table: "Leuze_Modules_Goal_Domain_GoalDefinitions");
114

  
115
            migrationBuilder.DropColumn(
116
                name: "GDAreaId",
117
                table: "Leuze_Modules_Goal_Domain_GoalDefinitions");
118

  
119
            migrationBuilder.DropColumn(
120
                name: "VariProjectHours",
121
                table: "Leuze_Modules_Goal_Domain_GoalDefinitions");
122

  
123
            migrationBuilder.AlterColumn<decimal>(
124
                name: "PercentileUser",
125
                table: "Leuze_Modules_Goal_Domain_GoalItems",
126
                type: "decimal(18,2)",
127
                nullable: false,
128
                oldClrType: typeof(double),
129
                oldType: "float");
130

  
131
            migrationBuilder.AlterColumn<decimal>(
132
                name: "PercentileFinal",
133
                table: "Leuze_Modules_Goal_Domain_GoalItems",
134
                type: "decimal(18,2)",
135
                nullable: false,
136
                oldClrType: typeof(double),
137
                oldType: "float");
138

  
139
            migrationBuilder.AddColumn<DateTime>(
140
                name: "From",
141
                table: "Leuze_Modules_Goal_Domain_GoalDefinitions",
142
                type: "datetime2",
143
                nullable: false,
144
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
145

  
146
            migrationBuilder.AddColumn<DateTime>(
147
                name: "To",
148
                table: "Leuze_Modules_Goal_Domain_GoalDefinitions",
149
                type: "datetime2",
150
                nullable: false,
151
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
152

  
153
            migrationBuilder.AddColumn<decimal>(
154
                name: "Vari",
155
                table: "Leuze_Modules_Goal_Domain_GoalDefinitions",
156
                type: "decimal(18,2)",
157
                nullable: true);
158
        }
159
    }
160
}
src/Core/Infrastructure/Leuze.Core.Infrastructure.Persistence/Migrations/20210513201935_Added-CreatedAt.Designer.cs
1
// <auto-generated />
2
using System;
3
using Leuze.Core.Infrastructure.Persistence;
4
using Microsoft.EntityFrameworkCore;
5
using Microsoft.EntityFrameworkCore.Infrastructure;
6
using Microsoft.EntityFrameworkCore.Metadata;
7
using Microsoft.EntityFrameworkCore.Migrations;
8
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
9

  
10
namespace Leuze.Core.Infrastructure.Persistence.Migrations
11
{
12
    [DbContext(typeof(LeuzeDbContext))]
13
    [Migration("20210513201935_Added-CreatedAt")]
14
    partial class AddedCreatedAt
15
    {
16
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
17
        {
18
#pragma warning disable 612, 618
19
            modelBuilder
20
                .HasAnnotation("Relational:MaxIdentifierLength", 128)
21
                .HasAnnotation("ProductVersion", "5.0.4")
22
                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
23

  
24
            modelBuilder.Entity("ApplicationPermissionApplicationRole", b =>
25
                {
26
                    b.Property<Guid>("PermissionsId")
27
                        .HasColumnType("uniqueidentifier");
28

  
29
                    b.Property<Guid>("RolesId")
30
                        .HasColumnType("uniqueidentifier");
31

  
32
                    b.HasKey("PermissionsId", "RolesId");
33

  
34
                    b.HasIndex("RolesId");
35

  
36
                    b.ToTable("Leuze_Roles_Assigned_Permissions");
37
                });
38

  
39
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationPermission", b =>
40
                {
41
                    b.Property<Guid>("Id")
42
                        .ValueGeneratedOnAdd()
43
                        .HasColumnType("uniqueidentifier");
44

  
45
                    b.Property<string>("Module")
46
                        .IsRequired()
47
                        .HasMaxLength(512)
48
                        .HasColumnType("nvarchar(512)");
49

  
50
                    b.Property<string>("Name")
51
                        .IsRequired()
52
                        .HasMaxLength(512)
53
                        .HasColumnType("nvarchar(512)");
54

  
55
                    b.Property<string>("Privilege")
56
                        .IsRequired()
57
                        .HasMaxLength(2048)
58
                        .HasColumnType("nvarchar(2048)");
59

  
60
                    b.HasKey("Id");
61

  
62
                    b.ToTable("Leuze_Application_Permissions");
63
                });
64

  
65
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationRole", b =>
66
                {
67
                    b.Property<Guid>("Id")
68
                        .ValueGeneratedOnAdd()
69
                        .HasColumnType("uniqueidentifier");
70

  
71
                    b.Property<string>("ConcurrencyStamp")
72
                        .IsConcurrencyToken()
73
                        .HasColumnType("nvarchar(max)");
74

  
75
                    b.Property<bool>("IsDefault")
76
                        .HasColumnType("bit");
77

  
78
                    b.Property<string>("Name")
79
                        .HasMaxLength(256)
80
                        .HasColumnType("nvarchar(256)");
81

  
82
                    b.Property<string>("NormalizedName")
83
                        .HasMaxLength(256)
84
                        .HasColumnType("nvarchar(256)");
85

  
86
                    b.HasKey("Id");
87

  
88
                    b.HasIndex("NormalizedName")
89
                        .IsUnique()
90
                        .HasDatabaseName("RoleNameIndex")
91
                        .HasFilter("[NormalizedName] IS NOT NULL");
92

  
93
                    b.ToTable("Leuze_Roles");
94
                });
95

  
96
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationRoleClaim", b =>
97
                {
98
                    b.Property<int>("Id")
99
                        .ValueGeneratedOnAdd()
100
                        .HasColumnType("int")
101
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
102

  
103
                    b.Property<string>("ClaimType")
104
                        .HasColumnType("nvarchar(max)");
105

  
106
                    b.Property<string>("ClaimValue")
107
                        .HasColumnType("nvarchar(max)");
108

  
109
                    b.Property<Guid>("RoleId")
110
                        .HasColumnType("uniqueidentifier");
111

  
112
                    b.HasKey("Id");
113

  
114
                    b.HasIndex("RoleId");
115

  
116
                    b.ToTable("AspNetRoleClaims");
117
                });
118

  
119
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUser", b =>
120
                {
121
                    b.Property<Guid>("Id")
122
                        .ValueGeneratedOnAdd()
123
                        .HasColumnType("uniqueidentifier");
124

  
125
                    b.Property<int>("AccessFailedCount")
126
                        .HasColumnType("int");
127

  
128
                    b.Property<string>("ConcurrencyStamp")
129
                        .IsConcurrencyToken()
130
                        .HasColumnType("nvarchar(max)");
131

  
132
                    b.Property<string>("Email")
133
                        .HasMaxLength(256)
134
                        .HasColumnType("nvarchar(256)");
135

  
136
                    b.Property<bool>("EmailConfirmed")
137
                        .HasColumnType("bit");
138

  
139
                    b.Property<bool>("IsAdUser")
140
                        .HasColumnType("bit");
141

  
142
                    b.Property<bool>("LockoutEnabled")
143
                        .HasColumnType("bit");
144

  
145
                    b.Property<DateTimeOffset?>("LockoutEnd")
146
                        .HasColumnType("datetimeoffset");
147

  
148
                    b.Property<string>("NormalizedEmail")
149
                        .HasMaxLength(256)
150
                        .HasColumnType("nvarchar(256)");
151

  
152
                    b.Property<string>("NormalizedUserName")
153
                        .HasMaxLength(256)
154
                        .HasColumnType("nvarchar(256)");
155

  
156
                    b.Property<string>("PasswordHash")
157
                        .HasColumnType("nvarchar(max)");
158

  
159
                    b.Property<string>("PhoneNumber")
160
                        .HasColumnType("nvarchar(max)");
161

  
162
                    b.Property<bool>("PhoneNumberConfirmed")
163
                        .HasColumnType("bit");
164

  
165
                    b.Property<string>("SecurityStamp")
166
                        .HasColumnType("nvarchar(max)");
167

  
168
                    b.Property<bool>("TwoFactorEnabled")
169
                        .HasColumnType("bit");
170

  
171
                    b.Property<string>("UserName")
172
                        .HasMaxLength(256)
173
                        .HasColumnType("nvarchar(256)");
174

  
175
                    b.HasKey("Id");
176

  
177
                    b.HasIndex("NormalizedEmail")
178
                        .HasDatabaseName("EmailIndex");
179

  
180
                    b.HasIndex("NormalizedUserName")
181
                        .IsUnique()
182
                        .HasDatabaseName("UserNameIndex")
183
                        .HasFilter("[NormalizedUserName] IS NOT NULL");
184

  
185
                    b.ToTable("Leuze_Users");
186
                });
187

  
188
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserClaim", b =>
189
                {
190
                    b.Property<int>("Id")
191
                        .ValueGeneratedOnAdd()
192
                        .HasColumnType("int")
193
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
194

  
195
                    b.Property<string>("ClaimType")
196
                        .HasColumnType("nvarchar(max)");
197

  
198
                    b.Property<string>("ClaimValue")
199
                        .HasColumnType("nvarchar(max)");
200

  
201
                    b.Property<Guid>("UserId")
202
                        .HasColumnType("uniqueidentifier");
203

  
204
                    b.HasKey("Id");
205

  
206
                    b.HasIndex("UserId");
207

  
208
                    b.ToTable("AspNetUserClaims");
209
                });
210

  
211
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserLogin", b =>
212
                {
213
                    b.Property<string>("LoginProvider")
214
                        .HasColumnType("nvarchar(450)");
215

  
216
                    b.Property<string>("ProviderKey")
217
                        .HasColumnType("nvarchar(450)");
218

  
219
                    b.Property<string>("ProviderDisplayName")
220
                        .HasColumnType("nvarchar(max)");
221

  
222
                    b.Property<Guid>("UserId")
223
                        .HasColumnType("uniqueidentifier");
224

  
225
                    b.HasKey("LoginProvider", "ProviderKey");
226

  
227
                    b.HasIndex("UserId");
228

  
229
                    b.ToTable("AspNetUserLogins");
230
                });
231

  
232
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserRole", b =>
233
                {
234
                    b.Property<Guid>("UserId")
235
                        .HasColumnType("uniqueidentifier");
236

  
237
                    b.Property<Guid>("RoleId")
238
                        .HasColumnType("uniqueidentifier");
239

  
240
                    b.HasKey("UserId", "RoleId");
241

  
242
                    b.HasIndex("RoleId");
243

  
244
                    b.ToTable("AspNetUserRoles");
245
                });
246

  
247
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserToken", b =>
248
                {
249
                    b.Property<Guid>("UserId")
250
                        .HasColumnType("uniqueidentifier");
251

  
252
                    b.Property<string>("LoginProvider")
253
                        .HasColumnType("nvarchar(450)");
254

  
255
                    b.Property<string>("Name")
256
                        .HasColumnType("nvarchar(450)");
257

  
258
                    b.Property<string>("Value")
259
                        .HasColumnType("nvarchar(max)");
260

  
261
                    b.HasKey("UserId", "LoginProvider", "Name");
262

  
263
                    b.ToTable("AspNetUserTokens");
264
                });
265

  
266
            modelBuilder.Entity("Leuze.Core.Domain.Domains.Users.DomainUser", b =>
267
                {
268
                    b.Property<Guid>("UserId")
269
                        .HasColumnType("uniqueidentifier");
270

  
271
                    b.Property<Guid?>("SeniorUserId")
272
                        .HasColumnType("uniqueidentifier");
273

  
274
                    b.HasKey("UserId");
275

  
276
                    b.HasIndex("SeniorUserId");
277

  
278
                    b.ToTable("Leuze_Domain_Users");
279
                });
280

  
281
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.Comment", b =>
282
                {
283
                    b.Property<Guid>("Id")
284
                        .ValueGeneratedOnAdd()
285
                        .HasColumnType("uniqueidentifier");
286

  
287
                    b.Property<DateTime>("CreatedAt")
288
                        .HasColumnType("datetime2");
289

  
290
                    b.Property<Guid>("CreatorId")
291
                        .HasColumnType("uniqueidentifier");
292

  
293
                    b.Property<Guid>("GoalId")
294
                        .HasColumnType("uniqueidentifier");
295

  
296
                    b.Property<bool>("IsChanged")
297
                        .HasColumnType("bit");
298

  
299
                    b.Property<bool>("IsPrivate")
300
                        .HasColumnType("bit");
301

  
302
                    b.Property<string>("Text")
303
                        .IsRequired()
304
                        .HasColumnType("nvarchar(max)");
305

  
306
                    b.HasKey("Id");
307

  
308
                    b.HasIndex("CreatorId");
309

  
310
                    b.HasIndex("GoalId");
311

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

  
315
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GlobalDefinitionArea", b =>
316
                {
317
                    b.Property<Guid>("Id")
318
                        .ValueGeneratedOnAdd()
319
                        .HasColumnType("uniqueidentifier");
320

  
321
                    b.Property<DateTime>("CreatedAt")
322
                        .HasColumnType("datetime2");
323

  
324
                    b.Property<Guid>("CreatorId")
325
                        .HasColumnType("uniqueidentifier");
326

  
327
                    b.Property<DateTime>("From")
328
                        .HasColumnType("datetime2");
329

  
330
                    b.Property<DateTime>("To")
331
                        .HasColumnType("datetime2");
332

  
333
                    b.Property<double?>("VariCompanySuccess")
334
                        .HasColumnType("float");
335

  
336
                    b.HasKey("Id");
337

  
338
                    b.HasIndex("CreatorId");
339

  
340
                    b.ToTable("Leuze_Modules_Goal_Domain_GoalDefinitionAreas");
341
                });
342

  
343
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GoalDefinition", b =>
344
                {
345
                    b.Property<Guid>("Id")
346
                        .ValueGeneratedOnAdd()
347
                        .HasColumnType("uniqueidentifier");
348

  
349
                    b.Property<DateTime>("CreatedAt")
350
                        .HasColumnType("datetime2");
351

  
352
                    b.Property<Guid>("CreatorId")
353
                        .HasColumnType("uniqueidentifier");
354

  
355
                    b.Property<double>("FinanceBase")
356
                        .HasColumnType("float");
357

  
358
                    b.Property<Guid>("GDAreaId")
359
                        .HasColumnType("uniqueidentifier");
360

  
361
                    b.Property<string>("Name")
362
                        .IsRequired()
363
                        .HasMaxLength(255)
364
                        .HasColumnType("nvarchar(255)");
365

  
366
                    b.Property<Guid>("OwnerId")
367
                        .HasColumnType("uniqueidentifier");
368

  
369
                    b.Property<bool>("OwnerLocked")
370
                        .HasColumnType("bit");
371

  
372
                    b.Property<bool>("SupervisorLocked")
373
                        .HasColumnType("bit");
374

  
375
                    b.Property<double?>("VariProjectHours")
376
                        .HasColumnType("float");
377

  
378
                    b.HasKey("Id");
379

  
380
                    b.HasIndex("CreatorId");
381

  
382
                    b.HasIndex("GDAreaId");
383

  
384
                    b.HasIndex("OwnerId");
385

  
386
                    b.ToTable("Leuze_Modules_Goal_Domain_GoalDefinitions");
387
                });
388

  
389
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GoalItem", b =>
390
                {
391
                    b.Property<Guid>("Id")
392
                        .ValueGeneratedOnAdd()
393
                        .HasColumnType("uniqueidentifier");
394

  
395
                    b.Property<DateTime>("CreatedAt")
396
                        .HasColumnType("datetime2");
397

  
398
                    b.Property<Guid>("CreatorId")
399
                        .HasColumnType("uniqueidentifier");
400

  
401
                    b.Property<string>("Description")
402
                        .IsRequired()
403
                        .HasColumnType("nvarchar(max)");
404

  
405
                    b.Property<Guid>("GoalDefinitionId")
406
                        .HasColumnType("uniqueidentifier");
407

  
408
                    b.Property<string>("Name")
409
                        .IsRequired()
410
                        .HasMaxLength(255)
411
                        .HasColumnType("nvarchar(255)");
412

  
413
                    b.Property<bool>("OwnerLocked")
414
                        .HasColumnType("bit");
415

  
416
                    b.Property<double>("PercentileFinal")
417
                        .HasColumnType("float");
418

  
419
                    b.Property<double>("PercentileUser")
420
                        .HasColumnType("float");
421

  
422
                    b.Property<bool>("SupervisorLocked")
423
                        .HasColumnType("bit");
424

  
425
                    b.HasKey("Id");
426

  
427
                    b.HasIndex("CreatorId");
428

  
429
                    b.HasIndex("GoalDefinitionId");
430

  
431
                    b.ToTable("Leuze_Modules_Goal_Domain_GoalItems");
432
                });
433

  
434
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GoalUpdate", b =>
435
                {
436
                    b.Property<Guid>("Id")
437
                        .ValueGeneratedOnAdd()
438
                        .HasColumnType("uniqueidentifier");
439

  
440
                    b.Property<DateTime>("CreatedAt")
441
                        .HasColumnType("datetime2");
442

  
443
                    b.Property<Guid>("CreatorId")
444
                        .HasColumnType("uniqueidentifier");
445

  
446
                    b.Property<Guid>("GoalId")
447
                        .HasColumnType("uniqueidentifier");
448

  
449
                    b.Property<string>("NewValue")
450
                        .IsRequired()
451
                        .HasColumnType("nvarchar(max)");
452

  
453
                    b.Property<string>("OldValue")
454
                        .IsRequired()
455
                        .HasColumnType("nvarchar(max)");
456

  
457
                    b.Property<int>("UpdatedType")
458
                        .HasColumnType("int");
459

  
460
                    b.HasKey("Id");
461

  
462
                    b.HasIndex("CreatorId");
463

  
464
                    b.HasIndex("GoalId");
465

  
466
                    b.ToTable("Leuze_Modules_Goal_Domain_GoalUpdates");
467
                });
468

  
469
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.Review", b =>
470
                {
471
                    b.Property<Guid>("Id")
472
                        .ValueGeneratedOnAdd()
473
                        .HasColumnType("uniqueidentifier");
474

  
475
                    b.Property<string>("CommentCreator")
476
                        .IsRequired()
477
                        .HasColumnType("nvarchar(max)");
478

  
479
                    b.Property<string>("CommentOwner")
480
                        .IsRequired()
481
                        .HasColumnType("nvarchar(max)");
482

  
483
                    b.Property<DateTime>("CreatedAt")
484
                        .HasColumnType("datetime2");
485

  
486
                    b.Property<Guid>("CreatorId")
487
                        .HasColumnType("uniqueidentifier");
488

  
489
                    b.Property<Guid>("GoalId")
490
                        .HasColumnType("uniqueidentifier");
491

  
492
                    b.Property<bool>("IsFinal")
493
                        .HasColumnType("bit");
494

  
495
                    b.HasKey("Id");
496

  
497
                    b.HasIndex("CreatorId");
498

  
499
                    b.HasIndex("GoalId");
500

  
501
                    b.ToTable("Leuze_Modules_Goal_Domain_Reviews");
502
                });
503

  
504
            modelBuilder.Entity("ApplicationPermissionApplicationRole", b =>
505
                {
506
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationPermission", null)
507
                        .WithMany()
508
                        .HasForeignKey("PermissionsId")
509
                        .OnDelete(DeleteBehavior.Cascade)
510
                        .IsRequired();
511

  
512
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationRole", null)
513
                        .WithMany()
514
                        .HasForeignKey("RolesId")
515
                        .OnDelete(DeleteBehavior.Cascade)
516
                        .IsRequired();
517
                });
518

  
519
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationRoleClaim", b =>
520
                {
521
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationRole", null)
522
                        .WithMany()
523
                        .HasForeignKey("RoleId")
524
                        .OnDelete(DeleteBehavior.Cascade)
525
                        .IsRequired();
526
                });
527

  
528
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserClaim", b =>
529
                {
530
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationUser", null)
531
                        .WithMany()
532
                        .HasForeignKey("UserId")
533
                        .OnDelete(DeleteBehavior.Cascade)
534
                        .IsRequired();
535
                });
536

  
537
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserLogin", b =>
538
                {
539
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationUser", null)
540
                        .WithMany()
541
                        .HasForeignKey("UserId")
542
                        .OnDelete(DeleteBehavior.Cascade)
543
                        .IsRequired();
544
                });
545

  
546
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserRole", b =>
547
                {
548
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationRole", "Role")
549
                        .WithMany()
550
                        .HasForeignKey("RoleId")
551
                        .OnDelete(DeleteBehavior.Cascade)
552
                        .IsRequired();
553

  
554
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationUser", "User")
555
                        .WithMany()
556
                        .HasForeignKey("UserId")
557
                        .OnDelete(DeleteBehavior.Cascade)
558
                        .IsRequired();
559

  
560
                    b.Navigation("Role");
561

  
562
                    b.Navigation("User");
563
                });
564

  
565
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserToken", b =>
566
                {
567
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationUser", null)
568
                        .WithMany()
569
                        .HasForeignKey("UserId")
570
                        .OnDelete(DeleteBehavior.Cascade)
571
                        .IsRequired();
572
                });
573

  
... Rozdílový soubor je zkrácen, protože jeho délka přesahuje max. limit.

Také k dispozici: Unified diff