Add role control
This commit is contained in:
@@ -1310,6 +1310,44 @@ namespace ROLAC.API.Migrations
|
||||
b.ToTable("RefreshTokens");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ROLAC.API.Entities.RolePermission", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<bool>("CanApprove")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("CanDelete")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("CanRead")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("CanWrite")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("Module")
|
||||
.IsRequired()
|
||||
.HasMaxLength(60)
|
||||
.HasColumnType("character varying(60)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(450)
|
||||
.HasColumnType("character varying(450)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RoleId", "Module")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("RolePermissions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("ROLAC.API.Entities.AppRole", null)
|
||||
@@ -1481,6 +1519,17 @@ namespace ROLAC.API.Migrations
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ROLAC.API.Entities.RolePermission", b =>
|
||||
{
|
||||
b.HasOne("ROLAC.API.Entities.AppRole", "Role")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Role");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ROLAC.API.Entities.AppUser", b =>
|
||||
{
|
||||
b.Navigation("RefreshTokens");
|
||||
|
||||
Reference in New Issue
Block a user