//
using System;
using Church.Net.DAL.EF;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace Church.Net.DAL.EFCoreDBF.Migrations
{
[DbContext(typeof(ChurchNetContext))]
[Migration("20220828023808_AddLoggingService")]
partial class AddLoggingService
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Church.Net.Entity.Career", b =>
{
b.Property("Id")
.HasColumnType("text");
b.Property("Name")
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.HasKey("Id");
b.ToTable("Careers");
});
modelBuilder.Entity("Church.Net.Entity.CellGroupRoutineEvent", b =>
{
b.Property("Id")
.HasColumnType("text");
b.Property("Address")
.HasColumnType("text");
b.Property("Time")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.ToTable("CellGroupRoutineEvents");
});
modelBuilder.Entity("Church.Net.Entity.CellGroupRoutineEventAttendee", b =>
{
b.Property("EventId")
.HasColumnType("text")
.HasColumnOrder(0);
b.Property("Id")
.HasColumnType("text")
.HasColumnOrder(1);
b.Property("Comment")
.HasColumnType("text");
b.Property("JoinPotluck")
.HasColumnType("boolean");
b.Property("Name")
.HasColumnType("text");
b.Property("PotluckItem")
.HasColumnType("text");
b.HasKey("EventId", "Id");
b.ToTable("CellGroupRoutineEventAttendees");
});
modelBuilder.Entity("Church.Net.Entity.CellGroupRoutineEventPrayer", b =>
{
b.Property("EventId")
.HasColumnType("text")
.HasColumnOrder(0);
b.Property("MemberId")
.HasColumnType("text")
.HasColumnOrder(1);
b.Property("Comment")
.HasColumnType("text");
b.Property("Prayer")
.HasColumnType("text");
b.HasKey("EventId", "MemberId");
b.ToTable("CellGroupRoutineEventPrayers");
});
modelBuilder.Entity("Church.Net.Entity.FamilyMember", b =>
{
b.Property("Id")
.HasColumnType("text");
b.Property("Address")
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property("AvatarImage")
.HasColumnType("text");
b.Property("Birthday")
.HasColumnType("timestamp with time zone");
b.Property("CareerId")
.HasColumnType("text");
b.Property("ComunityAppId")
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("DateOfBaptized")
.HasColumnType("timestamp with time zone");
b.Property("DateOfWalkIn")
.HasColumnType("timestamp with time zone");
b.Property("Email")
.IsRequired()
.HasColumnType("text");
b.Property("FirstName")
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("Gender")
.HasColumnType("integer");
b.Property("LastName")
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("Married")
.HasColumnType("boolean");
b.Property("Password")
.IsRequired()
.HasColumnType("text");
b.Property("Role")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("CareerId");
b.ToTable("FamilyMembers");
});
modelBuilder.Entity("Church.Net.Entity.FamilyMemberOAuth", b =>
{
b.Property("FamilyMemberId")
.HasColumnType("text")
.HasColumnOrder(0);
b.Property("OAuthType")
.HasColumnType("text")
.HasColumnOrder(1);
b.Property("OAuthAccessToken")
.HasColumnType("text");
b.HasKey("FamilyMemberId", "OAuthType");
b.ToTable("FamilyMemberOAuths");
});
modelBuilder.Entity("Church.Net.Entity.HappinessBEST", b =>
{
b.Property("Id")
.HasColumnType("text");
b.Property("Email")
.HasColumnType("text");
b.Property("GroupId")
.HasColumnType("text");
b.Property("Name")
.IsRequired()
.HasColumnType("text");
b.Property("Phone")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("GroupId");
b.ToTable("HappinessBESTs");
});
modelBuilder.Entity("Church.Net.Entity.HappinessGroup", b =>
{
b.Property("Id")
.HasColumnType("text");
b.Property("Address")
.HasColumnType("text");
b.Property("BeginTime")
.HasColumnType("timestamp with time zone");
b.Property("CityAndZipCode")
.HasColumnType("text");
b.Property("InvitationText")
.HasColumnType("text");
b.Property("Name")
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("HappinessGroups");
});
modelBuilder.Entity("Church.Net.Entity.HappinessWeek", b =>
{
b.Property("Id")
.HasColumnType("text");
b.Property("Address")
.HasColumnType("text");
b.Property("CityAndZipCode")
.HasColumnType("text");
b.Property("Date")
.HasColumnType("timestamp with time zone");
b.Property("GroupId")
.HasColumnType("text");
b.Property("InvitationText")
.HasColumnType("text");
b.Property("SEQ")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("GroupId");
b.ToTable("HappinessWeeks");
});
modelBuilder.Entity("Church.Net.Entity.LogInfo", b =>
{
b.Property("Id")
.HasColumnType("text");
b.Property("DetailMessage")
.HasColumnType("text");
b.Property("Level")
.HasColumnType("integer");
b.Property("Message")
.HasColumnType("text");
b.Property("Source")
.HasColumnType("text");
b.Property("StackTrace")
.HasColumnType("text");
b.Property("Time")
.HasColumnType("timestamp with time zone");
b.Property("TrackNo")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("TrackNo"));
b.Property("Url")
.HasColumnType("text");
b.Property("UserId")
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("LogInfos");
});
modelBuilder.Entity("Church.Net.Entity.NewVisitor", b =>
{
b.Property("Id")
.HasColumnType("text");
b.Property("Address")
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property("BirthDate")
.HasColumnType("timestamp with time zone");
b.Property("ComunityAppId")
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("Email")
.HasMaxLength(150)
.HasColumnType("character varying(150)");
b.Property("FirstName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("Gender")
.HasColumnType("integer");
b.Property("LastName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("Note")
.HasColumnType("text");
b.Property("Phone")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("character varying(150)");
b.Property("ReligionId")
.HasColumnType("integer");
b.Property("VisitingDate")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("ReligionId");
b.ToTable("NewVisitors");
});
modelBuilder.Entity("Church.Net.Entity.PastoralDomain", b =>
{
b.Property("Id")
.HasColumnType("text");
b.Property("Description")
.HasColumnType("text");
b.Property("Image1")
.HasColumnType("text");
b.Property("Image2")
.HasColumnType("text");
b.Property("Image3")
.HasColumnType("text");
b.Property("Image4")
.HasColumnType("text");
b.Property("Image5")
.HasColumnType("text");
b.Property("LeaderMemberId")
.HasColumnType("text");
b.Property("Name")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("LeaderMemberId");
b.ToTable("PastoralDomains");
});
modelBuilder.Entity("Church.Net.Entity.PastoralDomainMembers", b =>
{
b.Property("PastoralDomainId")
.HasColumnType("text")
.HasColumnOrder(0);
b.Property("FamilyMemberId")
.HasColumnType("text")
.HasColumnOrder(1);
b.HasKey("PastoralDomainId", "FamilyMemberId");
b.HasIndex("FamilyMemberId");
b.ToTable("PastoralDomainMembers");
});
modelBuilder.Entity("Church.Net.Entity.Religion", b =>
{
b.Property("ReligionId")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("ReligionId"));
b.Property("Name")
.HasColumnType("text");
b.HasKey("ReligionId");
b.ToTable("Religions");
});
modelBuilder.Entity("Church.Net.Entity.Vocabulary", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("DefinitionCh")
.IsRequired()
.HasColumnType("text");
b.Property("DefinitionEn")
.IsRequired()
.HasColumnType("text");
b.Property("FlashCardTimes")
.HasColumnType("integer");
b.Property("ImagesUrl")
.HasColumnType("text");
b.Property("InsertDate")
.HasColumnType("timestamp with time zone");
b.Property("NounPlural")
.HasColumnType("text");
b.Property("PartOfSpeech")
.HasColumnType("integer");
b.Property("PracticeApply")
.HasColumnType("boolean");
b.Property("PracticeDate")
.HasColumnType("timestamp with time zone");
b.Property("PracticeMemorized")
.HasColumnType("boolean");
b.Property("PracticeReview")
.HasColumnType("boolean");
b.Property("PracticeSelect")
.HasColumnType("boolean");
b.Property("PracticeSentence")
.HasColumnType("text");
b.Property("PracticeStage")
.HasColumnType("integer");
b.Property("PracticeVisualize")
.HasColumnType("boolean");
b.Property("VerbParticiple")
.HasColumnType("text");
b.Property("VerbPast")
.HasColumnType("text");
b.Property("Word")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Vocabulary");
});
modelBuilder.Entity("Church.Net.Entity.WhoIsSpy", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Answer1Chs")
.HasColumnType("text");
b.Property("Answer1Cht")
.HasColumnType("text");
b.Property("Answer1En")
.HasColumnType("text");
b.Property("Answer2Chs")
.HasColumnType("text");
b.Property("Answer2Cht")
.HasColumnType("text");
b.Property("Answer2En")
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("WhoIsSpy");
});
modelBuilder.Entity("Church.Net.Entity.CellGroupRoutineEventAttendee", b =>
{
b.HasOne("Church.Net.Entity.CellGroupRoutineEvent", "CellGroupRoutineEvent")
.WithMany("Attendees")
.HasForeignKey("EventId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("CellGroupRoutineEvent");
});
modelBuilder.Entity("Church.Net.Entity.CellGroupRoutineEventPrayer", b =>
{
b.HasOne("Church.Net.Entity.CellGroupRoutineEvent", "CellGroupRoutineEvent")
.WithMany("Prayers")
.HasForeignKey("EventId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("CellGroupRoutineEvent");
});
modelBuilder.Entity("Church.Net.Entity.FamilyMember", b =>
{
b.HasOne("Church.Net.Entity.Career", "Career")
.WithMany()
.HasForeignKey("CareerId");
b.Navigation("Career");
});
modelBuilder.Entity("Church.Net.Entity.FamilyMemberOAuth", b =>
{
b.HasOne("Church.Net.Entity.FamilyMember", null)
.WithMany("OAuthInfos")
.HasForeignKey("FamilyMemberId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Church.Net.Entity.HappinessBEST", b =>
{
b.HasOne("Church.Net.Entity.HappinessGroup", "HappinessGroup")
.WithMany("BestList")
.HasForeignKey("GroupId");
b.Navigation("HappinessGroup");
});
modelBuilder.Entity("Church.Net.Entity.HappinessWeek", b =>
{
b.HasOne("Church.Net.Entity.HappinessGroup", "HappinessGroup")
.WithMany("Weeks")
.HasForeignKey("GroupId");
b.Navigation("HappinessGroup");
});
modelBuilder.Entity("Church.Net.Entity.NewVisitor", b =>
{
b.HasOne("Church.Net.Entity.Religion", "Religion")
.WithMany()
.HasForeignKey("ReligionId");
b.Navigation("Religion");
});
modelBuilder.Entity("Church.Net.Entity.PastoralDomain", b =>
{
b.HasOne("Church.Net.Entity.FamilyMember", "Leader")
.WithMany()
.HasForeignKey("LeaderMemberId");
b.Navigation("Leader");
});
modelBuilder.Entity("Church.Net.Entity.PastoralDomainMembers", b =>
{
b.HasOne("Church.Net.Entity.FamilyMember", "FamilyMember")
.WithMany("PastoralDomains")
.HasForeignKey("FamilyMemberId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Church.Net.Entity.PastoralDomain", "PastoralDomain")
.WithMany("Members")
.HasForeignKey("PastoralDomainId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("FamilyMember");
b.Navigation("PastoralDomain");
});
modelBuilder.Entity("Church.Net.Entity.CellGroupRoutineEvent", b =>
{
b.Navigation("Attendees");
b.Navigation("Prayers");
});
modelBuilder.Entity("Church.Net.Entity.FamilyMember", b =>
{
b.Navigation("OAuthInfos");
b.Navigation("PastoralDomains");
});
modelBuilder.Entity("Church.Net.Entity.HappinessGroup", b =>
{
b.Navigation("BestList");
b.Navigation("Weeks");
});
modelBuilder.Entity("Church.Net.Entity.PastoralDomain", b =>
{
b.Navigation("Members");
});
#pragma warning restore 612, 618
}
}
}