// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

#nullable disable

namespace bitforum.Migrations.DefaultDb
{
    [DbContext(typeof(DefaultDbContext))]
    partial class DefaultDbContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "8.0.0")
                .HasAnnotation("Relational:MaxIdentifierLength", 128);

            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);

            modelBuilder.Entity("bitforum.Models.Config", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("datetime2");

                    b.Property<string>("Description")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("Key")
                        .IsRequired()
                        .HasColumnType("nvarchar(450)");

                    b.Property<string>("Value")
                        .HasColumnType("nvarchar(max)");

                    b.HasKey("ID");

                    b.HasIndex("Key")
                        .IsUnique();

                    b.ToTable("Config");
                });

            modelBuilder.Entity("bitforum.Models.Page.Banner.BannerItem", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));

                    b.Property<DateTime?>("CreatedAt")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("EndAt")
                        .HasColumnType("datetime2");

                    b.Property<int>("Height")
                        .HasColumnType("int");

                    b.Property<string>("Image")
                        .HasMaxLength(1024)
                        .HasColumnType("nvarchar(1024)");

                    b.Property<bool>("IsActive")
                        .HasColumnType("bit");

                    b.Property<string>("Link")
                        .HasMaxLength(255)
                        .HasColumnType("nvarchar(255)");

                    b.Property<int>("Order")
                        .HasColumnType("int");

                    b.Property<int>("PositionID")
                        .HasColumnType("int");

                    b.Property<DateTime?>("StartAt")
                        .HasColumnType("datetime2");

                    b.Property<string>("Subject")
                        .IsRequired()
                        .HasMaxLength(255)
                        .HasColumnType("nvarchar(255)");

                    b.Property<DateTime?>("UpdatedAt")
                        .HasColumnType("datetime2");

                    b.Property<int>("Views")
                        .HasColumnType("int");

                    b.Property<int>("Width")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("PositionID");

                    b.HasIndex(new[] { "IsActive" }, "IX_BannerItem_IsActive");

                    b.HasIndex(new[] { "Order" }, "IX_BannerItem_Order");

                    b.ToTable("BannerItem");
                });

            modelBuilder.Entity("bitforum.Models.Page.Banner.BannerPosition", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));

                    b.Property<string>("Code")
                        .IsRequired()
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<DateTime?>("CreatedAt")
                        .HasColumnType("datetime2");

                    b.Property<bool>("IsActive")
                        .HasColumnType("bit");

                    b.Property<string>("Subject")
                        .IsRequired()
                        .HasMaxLength(255)
                        .HasColumnType("nvarchar(255)");

                    b.Property<DateTime?>("UpdatedAt")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex(new[] { "Code" }, "IX_BannerPosition_Code")
                        .IsUnique();

                    b.HasIndex(new[] { "IsActive" }, "IX_BannerPosition_IsActive");

                    b.ToTable("BannerPosition");
                });

            modelBuilder.Entity("bitforum.Models.Page.Document", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));

                    b.Property<string>("Code")
                        .IsRequired()
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<string>("Content")
                        .HasColumnType("nvarchar(max)");

                    b.Property<DateTime?>("CreatedAt")
                        .HasColumnType("datetime2");

                    b.Property<bool>("IsActive")
                        .HasColumnType("bit");

                    b.Property<string>("Subject")
                        .IsRequired()
                        .HasMaxLength(120)
                        .HasColumnType("nvarchar(120)");

                    b.Property<DateTime?>("UpdatedAt")
                        .HasColumnType("datetime2");

                    b.Property<int>("Views")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex(new[] { "Code" }, "IX_Document_Code")
                        .IsUnique();

                    b.HasIndex(new[] { "IsActive" }, "IX_Document_IsActive");

                    b.ToTable("Document");
                });

            modelBuilder.Entity("bitforum.Models.Page.Faq.FaqCategory", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));

                    b.Property<string>("Code")
                        .IsRequired()
                        .HasMaxLength(30)
                        .HasColumnType("nvarchar(30)");

                    b.Property<DateTime?>("CreatedAt")
                        .HasColumnType("datetime2");

                    b.Property<bool>("IsActive")
                        .HasColumnType("bit");

                    b.Property<int>("Order")
                        .HasColumnType("int");

                    b.Property<string>("Subject")
                        .IsRequired()
                        .HasMaxLength(255)
                        .HasColumnType("nvarchar(255)");

                    b.Property<DateTime?>("UpdatedAt")
                        .HasColumnType("datetime2");

                    b.HasKey("ID");

                    b.HasIndex(new[] { "Code" }, "IX_FaqCategory_Code")
                        .IsUnique();

                    b.HasIndex(new[] { "Order" }, "IX_FaqCategory_Order");

                    b.ToTable("FaqCategory");
                });

            modelBuilder.Entity("bitforum.Models.Page.Faq.FaqItem", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));

                    b.Property<string>("Answer")
                        .HasColumnType("nvarchar(max)");

                    b.Property<int>("CategoryID")
                        .HasColumnType("int");

                    b.Property<DateTime?>("CreatedAt")
                        .HasColumnType("datetime2");

                    b.Property<bool>("IsActive")
                        .HasColumnType("bit");

                    b.Property<int>("Order")
                        .HasColumnType("int");

                    b.Property<string>("Question")
                        .IsRequired()
                        .HasMaxLength(255)
                        .HasColumnType("nvarchar(255)");

                    b.Property<DateTime?>("UpdatedAt")
                        .HasColumnType("datetime2");

                    b.Property<int>("Views")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("CategoryID");

                    b.HasIndex(new[] { "IsActive" }, "IX_FaqItem_IsActive");

                    b.HasIndex(new[] { "Order" }, "IX_FaqItem_Order");

                    b.ToTable("FaqItem");
                });

            modelBuilder.Entity("bitforum.Models.Page.Popup", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));

                    b.Property<string>("Content")
                        .HasColumnType("nvarchar(max)");

                    b.Property<DateTime?>("CreatedAt")
                        .HasColumnType("datetime2");

                    b.Property<DateTime?>("EndAt")
                        .HasColumnType("datetime2");

                    b.Property<bool>("IsActive")
                        .HasColumnType("bit");

                    b.Property<string>("Link")
                        .HasMaxLength(255)
                        .HasColumnType("nvarchar(255)");

                    b.Property<int>("Order")
                        .HasColumnType("int");

                    b.Property<DateTime?>("StartAt")
                        .HasColumnType("datetime2");

                    b.Property<string>("Subject")
                        .IsRequired()
                        .HasMaxLength(255)
                        .HasColumnType("nvarchar(255)");

                    b.Property<DateTime?>("UpdatedAt")
                        .HasColumnType("datetime2");

                    b.Property<int>("Views")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex(new[] { "IsActive" }, "IX_Popup_IsActive");

                    b.ToTable("Popup");
                });

            modelBuilder.Entity("bitforum.Models.User.Member", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasComment("PK");

                    b.Property<DateTime?>("AuthCertifiedAt")
                        .HasColumnType("datetime2")
                        .HasComment("본인인증 일시");

                    b.Property<DateOnly?>("Birthday")
                        .HasMaxLength(10)
                        .HasColumnType("date")
                        .HasComment("생년월일");

                    b.Property<long>("Coin")
                        .HasColumnType("bigint")
                        .HasComment("코인");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("datetime2")
                        .HasComment("가입 일시");

                    b.Property<DateTime?>("DeletedAt")
                        .HasColumnType("datetime2")
                        .HasComment("탈퇴 일시");

                    b.Property<string>("DeviceInfo")
                        .HasMaxLength(400)
                        .HasColumnType("nvarchar(400)")
                        .HasComment("로그인 단말기 정보");

                    b.Property<string>("Email")
                        .IsRequired()
                        .HasMaxLength(255)
                        .HasColumnType("nvarchar(255)")
                        .HasComment("이메일");

                    b.Property<DateTime?>("EmailVerifiedAt")
                        .HasColumnType("datetime2")
                        .HasComment("이메일 인증 일시");

                    b.Property<int>("Exp")
                        .HasColumnType("int")
                        .HasComment("경험치");

                    b.Property<string>("FirstName")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)")
                        .HasComment("본명(성)");

                    b.Property<int>("Followed")
                        .HasColumnType("int")
                        .HasComment("구독자");

                    b.Property<int>("Following")
                        .HasColumnType("int")
                        .HasComment("구독 중");

                    b.Property<string>("FullName")
                        .HasMaxLength(40)
                        .HasColumnType("nvarchar(40)")
                        .HasComment("본명");

                    b.Property<int?>("Gender")
                        .HasMaxLength(6)
                        .HasColumnType("int")
                        .HasComment("성별");

                    b.Property<int?>("GradeID")
                        .HasColumnType("int")
                        .HasComment("회원등급 ID");

                    b.Property<string>("Intro")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)")
                        .HasComment("자기소개");

                    b.Property<bool>("IsAdmin")
                        .HasColumnType("bit")
                        .HasComment("운영진 여부");

                    b.Property<bool>("IsAuthCertified")
                        .HasColumnType("bit")
                        .HasComment("본인 인증 여부");

                    b.Property<bool>("IsDenied")
                        .HasColumnType("bit")
                        .HasComment("차단 여부");

                    b.Property<bool>("IsEmailVerified")
                        .HasColumnType("bit")
                        .HasComment("이메일 인증 여부");

                    b.Property<bool>("IsWithdraw")
                        .HasColumnType("bit")
                        .HasComment("탈퇴 여부");

                    b.Property<DateTime?>("LastLoginAt")
                        .HasColumnType("datetime2")
                        .HasComment("마지막 로그인 일시");

                    b.Property<string>("LastLoginIp")
                        .HasMaxLength(15)
                        .HasColumnType("nvarchar(15)")
                        .HasComment("마지막 로그인 IP");

                    b.Property<string>("LastName")
                        .HasMaxLength(40)
                        .HasColumnType("nvarchar(40)")
                        .HasComment("본명(이름)");

                    b.Property<string>("Name")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)")
                        .HasComment("별명");

                    b.Property<string>("Password")
                        .IsRequired()
                        .HasMaxLength(255)
                        .HasColumnType("nvarchar(255)")
                        .HasComment("비밀번호");

                    b.Property<DateTime>("PasswordUpdatedAt")
                        .HasColumnType("datetime2")
                        .HasComment("비밀번호 변경 일시");

                    b.Property<string>("Phone")
                        .HasMaxLength(15)
                        .HasColumnType("nvarchar(15)")
                        .HasComment("연락처");

                    b.Property<string>("Photo")
                        .HasMaxLength(255)
                        .HasColumnType("nvarchar(255)")
                        .HasComment("사진");

                    b.Property<string>("SID")
                        .IsRequired()
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)")
                        .HasComment("SID");

                    b.Property<string>("SignupIP")
                        .IsRequired()
                        .HasMaxLength(15)
                        .HasColumnType("nvarchar(15)")
                        .HasComment("회원가입 시 IP");

                    b.Property<string>("Summary")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)")
                        .HasComment("한마디");

                    b.Property<DateTime?>("UpdatedAt")
                        .HasColumnType("datetime2")
                        .HasComment("수정 일시");

                    b.HasKey("ID");

                    b.HasIndex("GradeID");

                    b.HasIndex(new[] { "Email" }, "IX_Member_Email")
                        .IsUnique();

                    b.HasIndex(new[] { "Name" }, "IX_Member_Name")
                        .IsUnique()
                        .HasFilter("[Name] IS NOT NULL");

                    b.HasIndex(new[] { "SID" }, "IX_Member_SID")
                        .IsUnique();

                    b.ToTable("Member", t =>
                        {
                            t.HasComment("회원 정보");
                        });
                });

            modelBuilder.Entity("bitforum.Models.User.MemberApprove", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasComment("회원 ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));

                    b.Property<bool>("IsDisclosureInvest")
                        .HasColumnType("bit")
                        .HasComment("투자 현황 공개 여부");

                    b.Property<bool>("IsReceiveEmail")
                        .HasColumnType("bit")
                        .HasComment("E-MAIL 수신 여부");

                    b.Property<bool>("IsReceiveNote")
                        .HasColumnType("bit")
                        .HasComment("쪽지 수신 여부");

                    b.Property<bool>("IsReceiveSMS")
                        .HasColumnType("bit")
                        .HasComment("SMS 수신 여부");

                    b.HasKey("ID");

                    b.ToTable("MemberApprove", t =>
                        {
                            t.HasComment("회원 동의 및 수신 여부");
                        });
                });

            modelBuilder.Entity("bitforum.Models.User.MemberGrade", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasComment("PK");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("datetime2")
                        .HasComment("등록 일시");

                    b.Property<string>("Description")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)")
                        .HasComment("설명");

                    b.Property<string>("EngName")
                        .IsRequired()
                        .HasMaxLength(120)
                        .HasColumnType("nvarchar(120)")
                        .HasComment("영문 명");

                    b.Property<string>("Image")
                        .HasColumnType("nvarchar(max)")
                        .HasComment("이미지");

                    b.Property<bool>("IsActive")
                        .HasColumnType("bit")
                        .HasComment("사용 여부");

                    b.Property<string>("KorName")
                        .IsRequired()
                        .HasMaxLength(120)
                        .HasColumnType("nvarchar(120)")
                        .HasComment("한글 명");

                    b.Property<short>("Order")
                        .HasColumnType("smallint")
                        .HasComment("순서");

                    b.Property<int>("RequiredCoin")
                        .HasColumnType("int")
                        .HasComment("최소 코인(Coin)");

                    b.Property<int>("RequiredExp")
                        .HasColumnType("int")
                        .HasComment("최소 경험치(Exp)");

                    b.Property<DateTime?>("UpdatedAt")
                        .HasColumnType("datetime2")
                        .HasComment("수정 일시");

                    b.HasKey("ID");

                    b.HasIndex(new[] { "EngName" }, "IX_MemberGrade_EngName")
                        .IsUnique();

                    b.HasIndex(new[] { "KorName" }, "IX_MemberGrade_KorName")
                        .IsUnique();

                    b.ToTable("MemberGrade", t =>
                        {
                            t.HasComment("회원 등급");
                        });
                });

            modelBuilder.Entity("bitforum.Models.Page.Banner.BannerItem", b =>
                {
                    b.HasOne("bitforum.Models.Page.Banner.BannerPosition", "BannerPosition")
                        .WithMany("BannerItem")
                        .HasForeignKey("PositionID")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("BannerPosition");
                });

            modelBuilder.Entity("bitforum.Models.Page.Faq.FaqItem", b =>
                {
                    b.HasOne("bitforum.Models.Page.Faq.FaqCategory", "FaqCategory")
                        .WithMany("FaqItem")
                        .HasForeignKey("CategoryID")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("FaqCategory");
                });

            modelBuilder.Entity("bitforum.Models.User.Member", b =>
                {
                    b.HasOne("bitforum.Models.User.MemberGrade", "MemberGrade")
                        .WithMany()
                        .HasForeignKey("GradeID");

                    b.HasOne("bitforum.Models.User.MemberApprove", "MemberApproves")
                        .WithOne("Member")
                        .HasForeignKey("bitforum.Models.User.Member", "ID")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("MemberApproves");

                    b.Navigation("MemberGrade");
                });

            modelBuilder.Entity("bitforum.Models.Page.Banner.BannerPosition", b =>
                {
                    b.Navigation("BannerItem");
                });

            modelBuilder.Entity("bitforum.Models.Page.Faq.FaqCategory", b =>
                {
                    b.Navigation("FaqItem");
                });

            modelBuilder.Entity("bitforum.Models.User.MemberApprove", b =>
                {
                    b.Navigation("Member")
                        .IsRequired();
                });
#pragma warning restore 612, 618
        }
    }
}
