added CreatedBy to surveys
This commit is contained in:
parent
3b6952364c
commit
dbcdfac698
7 changed files with 443 additions and 22 deletions
|
|
@ -177,6 +177,9 @@ namespace SurveyBackend.Infrastructure.Data.Migrations
|
|||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("CreatedBy")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
|
@ -187,6 +190,8 @@ namespace SurveyBackend.Infrastructure.Data.Migrations
|
|||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CreatedBy");
|
||||
|
||||
b.ToTable("Surveys");
|
||||
});
|
||||
|
||||
|
|
@ -286,6 +291,14 @@ namespace SurveyBackend.Infrastructure.Data.Migrations
|
|||
b.Navigation("Survey");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SurveyLib.Core.Models.Survey", b =>
|
||||
{
|
||||
b.HasOne("SurveyBackend.Core.Models.User", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatedBy")
|
||||
.OnDelete(DeleteBehavior.SetNull);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SurveyLib.Core.Models.Completion", b =>
|
||||
{
|
||||
b.Navigation("Answers");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue