2021-03-26 20:09:52 +04:00
|
|
|
|
// <auto-generated />
|
|
|
|
|
using System;
|
|
|
|
|
using DatabaseCore;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
|
|
|
|
|
|
namespace DatabaseCore.Migrations
|
|
|
|
|
{
|
|
|
|
|
[DbContext(typeof(DatabaseContext))]
|
|
|
|
|
partial class DatabaseContextModelSnapshot : ModelSnapshot
|
|
|
|
|
{
|
|
|
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
#pragma warning disable 612, 618
|
|
|
|
|
modelBuilder
|
|
|
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128)
|
|
|
|
|
.HasAnnotation("ProductVersion", "5.0.4")
|
|
|
|
|
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseCore.Models.Security.Access", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
|
|
2021-03-27 23:50:29 +04:00
|
|
|
|
b.Property<int>("AccessOperation")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
2021-03-26 20:09:52 +04:00
|
|
|
|
b.Property<int>("AccessType")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("DateCreate")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime?>("DateDelete")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
|
|
|
.HasColumnType("bit");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid>("RoleId")
|
|
|
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Accesses");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseCore.Models.Security.EnviromentSetting", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Key")
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Value")
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("EnviromentSettings");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseCore.Models.Security.Role", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("DateCreate")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime?>("DateDelete")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
|
|
|
.HasColumnType("bit");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("RoleName")
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("RolePriority")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Roles");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseCore.Models.Security.User", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
|
|
|
|
|
|
b.Property<byte[]>("Avatar")
|
|
|
|
|
.HasColumnType("varbinary(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("CountAttempt")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime?>("DateBanned")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("DateCreate")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime?>("DateDelete")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime?>("DateLastVisit")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid?>("EmployeeId")
|
|
|
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
|
|
|
|
|
|
b.Property<bool>("IsBanned")
|
|
|
|
|
.HasColumnType("bit");
|
|
|
|
|
|
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
|
|
|
.HasColumnType("bit");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid?>("LecturerId")
|
|
|
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("PasswordHash")
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid?>("StudentId")
|
|
|
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("UserName")
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Users");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseCore.Models.Security.UserRole", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
|
|
2021-03-27 23:50:29 +04:00
|
|
|
|
b.Property<DateTime>("DateCreate")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime?>("DateDelete")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
|
|
|
.HasColumnType("bit");
|
|
|
|
|
|
2021-03-26 20:09:52 +04:00
|
|
|
|
b.Property<Guid>("RoleId")
|
|
|
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid>("UserId")
|
|
|
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("UserRoles");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseCore.Models.Security.Access", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("DatabaseCore.Models.Security.Role", "Role")
|
|
|
|
|
.WithMany("Access")
|
|
|
|
|
.HasForeignKey("RoleId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Role");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseCore.Models.Security.UserRole", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("DatabaseCore.Models.Security.Role", "Role")
|
|
|
|
|
.WithMany("UserRoles")
|
|
|
|
|
.HasForeignKey("RoleId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("DatabaseCore.Models.Security.User", "User")
|
|
|
|
|
.WithMany("UserRoles")
|
|
|
|
|
.HasForeignKey("UserId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Role");
|
|
|
|
|
|
|
|
|
|
b.Navigation("User");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseCore.Models.Security.Role", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Access");
|
|
|
|
|
|
|
|
|
|
b.Navigation("UserRoles");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseCore.Models.Security.User", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("UserRoles");
|
|
|
|
|
});
|
|
|
|
|
#pragma warning restore 612, 618
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|