1051 lines
37 KiB
C#
1051 lines
37 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using DocuMed.Repository.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace DocuMed.Repository.Migrations
|
|
{
|
|
[DbContext(typeof(ApplicationContext))]
|
|
[Migration("20250112081155_Init")]
|
|
partial class Init
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasDefaultSchema("public")
|
|
.HasAnnotation("ProductVersion", "8.0.8")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.City.City", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Cities", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.City.University", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Address")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("CityId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CityId");
|
|
|
|
b.ToTable("Universities", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.Hospitals.Hospital", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Address")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Detail")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("UniversityId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UniversityId");
|
|
|
|
b.ToTable("Hospitals", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.Hospitals.Section", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Detail")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("HospitalId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid?>("UniversityId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("HospitalId");
|
|
|
|
b.HasIndex("UniversityId");
|
|
|
|
b.ToTable("Sections", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistory.MedicalHistory", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("AddictionHistoryDetail")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("AllergyDetail")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("ChiefComplaint")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Code")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<double>("DiastolicBloodPressure")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<string>("DrugHistoryDetail")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("FamilyHistoryDetail")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("GeneralAppearanceDetail")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<Guid>("MedicalHistoryTemplateId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("PastDiseasesHistoryDetail")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("PastSurgeryHistoryDetail")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("PatientId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("PresentIllnessDetail")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<double>("PulseRate")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<double>("SPO2")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<Guid>("SectionId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("StudentId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("SystemReviewDetail")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<double>("SystolicBloodPressure")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<double>("Temperature")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<string>("VitalSignDetail")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("PatientId");
|
|
|
|
b.HasIndex("SectionId");
|
|
|
|
b.HasIndex("StudentId");
|
|
|
|
b.ToTable("MedicalHistories", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistory.MedicalHistoryAnswer", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Answer")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<Guid>("MedicalHistoryId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Part")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Question")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("QuestionType")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("MedicalHistoryId");
|
|
|
|
b.ToTable("MedicalHistoryAnswers", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistoryTemplate.MedicalHistoryQuestion", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int>("BodySystem")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsSign")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsSymptom")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<Guid>("MedicalHistoryTemplateId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Part")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Question")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("QuestionType")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("MedicalHistoryTemplateId");
|
|
|
|
b.ToTable("MedicalHistoryQuestions", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistoryTemplate.MedicalHistoryTemplate", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("ChiefComplaint")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("SectionId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("StudentId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("SectionId");
|
|
|
|
b.HasIndex("StudentId");
|
|
|
|
b.ToTable("MedicalHistoryTemplates", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.Patients.Patient", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("AdmissionAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("Bed")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("HospitalId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Room")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("SectionId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("UnitNumber")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("SectionId");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("Patients", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.Staffs.Student", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("SectionId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("StudentId")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("UniversityId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("SectionId");
|
|
|
|
b.HasIndex("UniversityId");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("Students", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.User.ApplicationRole", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.IsConcurrencyToken()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("EnglishName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<string>("NormalizedName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<string>("PersianName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("NormalizedName")
|
|
.IsUnique()
|
|
.HasDatabaseName("RoleNameIndex");
|
|
|
|
b.ToTable("Roles", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.User.ApplicationUser", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int>("AccessFailedCount")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("BirthDate")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.IsConcurrencyToken()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Email")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<bool>("EmailConfirmed")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("FirstName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Gender")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("LastName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("LockoutEnabled")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("NationalId")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("NormalizedEmail")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<string>("NormalizedUserName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("PhoneNumberConfirmed")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("SecurityStamp")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("SignUpStatus")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<bool>("TwoFactorEnabled")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("UserName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("NormalizedEmail")
|
|
.HasDatabaseName("EmailIndex");
|
|
|
|
b.HasIndex("NormalizedUserName")
|
|
.IsUnique()
|
|
.HasDatabaseName("UserNameIndex");
|
|
|
|
b.ToTable("Users", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("ClaimType")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("ClaimValue")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("RoleId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
b.ToTable("RoleClaims", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<System.Guid>", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("ClaimType")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("ClaimValue")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("Claims", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<System.Guid>", b =>
|
|
{
|
|
b.Property<string>("LoginProvider")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("ProviderKey")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("ProviderDisplayName")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("LoginProvider", "ProviderKey");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("Logins", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>", b =>
|
|
{
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("RoleId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("UserId", "RoleId");
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
b.ToTable("UserRoles", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<System.Guid>", b =>
|
|
{
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("LoginProvider")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Value")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("UserId", "LoginProvider", "Name");
|
|
|
|
b.ToTable("Tokens", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.City.University", b =>
|
|
{
|
|
b.HasOne("DocuMed.Domain.Entities.City.City", "City")
|
|
.WithMany("Universities")
|
|
.HasForeignKey("CityId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("City");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.Hospitals.Hospital", b =>
|
|
{
|
|
b.HasOne("DocuMed.Domain.Entities.City.University", "University")
|
|
.WithMany()
|
|
.HasForeignKey("UniversityId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("University");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.Hospitals.Section", b =>
|
|
{
|
|
b.HasOne("DocuMed.Domain.Entities.Hospitals.Hospital", "Hospital")
|
|
.WithMany("Sections")
|
|
.HasForeignKey("HospitalId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("DocuMed.Domain.Entities.City.University", null)
|
|
.WithMany("Sections")
|
|
.HasForeignKey("UniversityId");
|
|
|
|
b.Navigation("Hospital");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistory.MedicalHistory", b =>
|
|
{
|
|
b.HasOne("DocuMed.Domain.Entities.Patients.Patient", "Patient")
|
|
.WithMany()
|
|
.HasForeignKey("PatientId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("DocuMed.Domain.Entities.Hospitals.Section", "Section")
|
|
.WithMany()
|
|
.HasForeignKey("SectionId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("DocuMed.Domain.Entities.Staffs.Student", "Student")
|
|
.WithMany()
|
|
.HasForeignKey("StudentId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Patient");
|
|
|
|
b.Navigation("Section");
|
|
|
|
b.Navigation("Student");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistory.MedicalHistoryAnswer", b =>
|
|
{
|
|
b.HasOne("DocuMed.Domain.Entities.MedicalHistory.MedicalHistory", "MedicalHistory")
|
|
.WithMany("Answers")
|
|
.HasForeignKey("MedicalHistoryId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("MedicalHistory");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistoryTemplate.MedicalHistoryQuestion", b =>
|
|
{
|
|
b.HasOne("DocuMed.Domain.Entities.MedicalHistoryTemplate.MedicalHistoryTemplate", "MedicalHistoryTemplate")
|
|
.WithMany("Questions")
|
|
.HasForeignKey("MedicalHistoryTemplateId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("MedicalHistoryTemplate");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistoryTemplate.MedicalHistoryTemplate", b =>
|
|
{
|
|
b.HasOne("DocuMed.Domain.Entities.Hospitals.Section", "Section")
|
|
.WithMany()
|
|
.HasForeignKey("SectionId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("DocuMed.Domain.Entities.Staffs.Student", "Student")
|
|
.WithMany()
|
|
.HasForeignKey("StudentId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Section");
|
|
|
|
b.Navigation("Student");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.Patients.Patient", b =>
|
|
{
|
|
b.HasOne("DocuMed.Domain.Entities.Hospitals.Section", "Section")
|
|
.WithMany()
|
|
.HasForeignKey("SectionId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("DocuMed.Domain.Entities.User.ApplicationUser", "User")
|
|
.WithMany("Patients")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Section");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.Staffs.Student", b =>
|
|
{
|
|
b.HasOne("DocuMed.Domain.Entities.Hospitals.Section", "Section")
|
|
.WithMany()
|
|
.HasForeignKey("SectionId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("DocuMed.Domain.Entities.City.University", "University")
|
|
.WithMany()
|
|
.HasForeignKey("UniversityId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("DocuMed.Domain.Entities.User.ApplicationUser", "User")
|
|
.WithMany("Students")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Section");
|
|
|
|
b.Navigation("University");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b =>
|
|
{
|
|
b.HasOne("DocuMed.Domain.Entities.User.ApplicationRole", null)
|
|
.WithMany()
|
|
.HasForeignKey("RoleId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<System.Guid>", b =>
|
|
{
|
|
b.HasOne("DocuMed.Domain.Entities.User.ApplicationUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<System.Guid>", b =>
|
|
{
|
|
b.HasOne("DocuMed.Domain.Entities.User.ApplicationUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>", b =>
|
|
{
|
|
b.HasOne("DocuMed.Domain.Entities.User.ApplicationRole", null)
|
|
.WithMany()
|
|
.HasForeignKey("RoleId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("DocuMed.Domain.Entities.User.ApplicationUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<System.Guid>", b =>
|
|
{
|
|
b.HasOne("DocuMed.Domain.Entities.User.ApplicationUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.City.City", b =>
|
|
{
|
|
b.Navigation("Universities");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.City.University", b =>
|
|
{
|
|
b.Navigation("Sections");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.Hospitals.Hospital", b =>
|
|
{
|
|
b.Navigation("Sections");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistory.MedicalHistory", b =>
|
|
{
|
|
b.Navigation("Answers");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistoryTemplate.MedicalHistoryTemplate", b =>
|
|
{
|
|
b.Navigation("Questions");
|
|
});
|
|
|
|
modelBuilder.Entity("DocuMed.Domain.Entities.User.ApplicationUser", b =>
|
|
{
|
|
b.Navigation("Patients");
|
|
|
|
b.Navigation("Students");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|