ApiKey
This commit is contained in:
parent
749eb645d5
commit
dd6d83cf06
28 changed files with 1097 additions and 184 deletions
|
|
@ -126,6 +126,27 @@ namespace nugethost.Migrations
|
|||
b.ToTable("AspNetUserTokens");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("nuget_host.Models.ApiKeys.ApiKey", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("CreationDate");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("ValidityPeriodInDays");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("ApiKeys");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("nuget_host.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
|
|
@ -222,6 +243,14 @@ namespace nugethost.Migrations
|
|||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("nuget_host.Models.ApiKeys.ApiKey", b =>
|
||||
{
|
||||
b.HasOne("nuget_host.Models.ApplicationUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue