user administration
This commit is contained in:
@@ -22,6 +22,27 @@ namespace CalendarReminder.Api.Migrations
|
||||
|
||||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("CalendarReminder.Domain.Entities.Family", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Name")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("Families");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CalendarReminder.Domain.Entities.PasswordResetToken", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -128,6 +149,15 @@ namespace CalendarReminder.Api.Migrations
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)");
|
||||
|
||||
b.Property<int?>("FamilyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("IsAdmin")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<bool>("MustChangePassword")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("PasswordHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
@@ -142,6 +172,8 @@ namespace CalendarReminder.Api.Migrations
|
||||
b.HasIndex("Email")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("FamilyId");
|
||||
|
||||
b.HasIndex("Username")
|
||||
.IsUnique();
|
||||
|
||||
@@ -178,6 +210,21 @@ namespace CalendarReminder.Api.Migrations
|
||||
b.Navigation("SharedWithUser");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CalendarReminder.Domain.Entities.User", b =>
|
||||
{
|
||||
b.HasOne("CalendarReminder.Domain.Entities.Family", "Family")
|
||||
.WithMany("Users")
|
||||
.HasForeignKey("FamilyId")
|
||||
.OnDelete(DeleteBehavior.SetNull);
|
||||
|
||||
b.Navigation("Family");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CalendarReminder.Domain.Entities.Family", b =>
|
||||
{
|
||||
b.Navigation("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CalendarReminder.Domain.Entities.Reminder", b =>
|
||||
{
|
||||
b.Navigation("Shares");
|
||||
|
||||
Reference in New Issue
Block a user