//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace bitforum.Migrations.DefaultDb
{
[DbContext(typeof(DefaultDbContext))]
[Migration("20250222132132_a4")]
partial class a4
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.13")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("bitforum.Models.Account.EmailVerifyNumber", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("PK");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("Code")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("nvarchar(10)")
.HasComment("Code");
b.Property("CreatedAt")
.HasColumnType("datetime2")
.HasComment("등록 일시");
b.Property("Email")
.IsRequired()
.HasMaxLength(60)
.HasColumnType("nvarchar(60)")
.HasComment("이메일");
b.Property("Expiration")
.HasColumnType("datetime2")
.HasComment("만료 일시");
b.Property("IsVerified")
.HasColumnType("bit")
.HasComment("인증 여부");
b.Property("Type")
.HasColumnType("int")
.HasComment("인증 유형 (이메일 인증 / 비밀번호 재설정)");
b.HasKey("ID");
b.HasIndex(new[] { "Code" }, "IX_EmailVerifyNumber_Code");
b.HasIndex(new[] { "Email" }, "IX_EmailVerifyNumber_Email");
b.HasIndex(new[] { "Expiration" }, "IX_EmailVerifyNumber_Expiration");
b.HasIndex(new[] { "IsVerified" }, "IX_EmailVerifyNumber_IsVerified");
b.HasIndex(new[] { "Type" }, "IX_EmailVerifyNumber_Type");
b.ToTable("EmailVerifyNumber", t =>
{
t.HasComment("이메일 인증 번호들");
});
});
modelBuilder.Entity("bitforum.Models.Account.EmailVerifyToken", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("PK");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("Additional")
.HasColumnType("nvarchar(max)")
.HasComment("추가 정보(JSON)");
b.Property("CreatedAt")
.HasColumnType("datetime2")
.HasComment("등록 일시");
b.Property("Email")
.IsRequired()
.HasMaxLength(60)
.HasColumnType("nvarchar(60)")
.HasComment("이메일");
b.Property("Expiration")
.HasColumnType("datetime2")
.HasComment("만료 일시");
b.Property("IsVerified")
.HasColumnType("bit")
.HasComment("인증 여부");
b.Property("Token")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasComment("Token");
b.Property("Type")
.HasColumnType("int")
.HasComment("인증 유형 (이메일 인증 / 비밀번호 재설정)");
b.HasKey("ID");
b.HasIndex(new[] { "Email" }, "IX_EmailVerifyToken_Email");
b.HasIndex(new[] { "Expiration" }, "IX_EmailVerifyToken_Expiration");
b.HasIndex(new[] { "IsVerified" }, "IX_EmailVerifyToken_IsVerified");
b.HasIndex(new[] { "Token" }, "IX_EmailVerifyToken_Token");
b.HasIndex(new[] { "Type" }, "IX_EmailVerifyToken_Type");
b.ToTable("EmailVerifyToken", t =>
{
t.HasComment("이메일 인증 토큰들");
});
});
modelBuilder.Entity("bitforum.Models.Account.Member", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("PK");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("AuthCertifiedAt")
.HasColumnType("datetime2")
.HasComment("본인인증 일시");
b.Property("Birthday")
.HasColumnType("date")
.HasComment("생년월일");
b.Property("Coin")
.HasColumnType("bigint")
.HasComment("코인");
b.Property("CreatedAt")
.HasColumnType("datetime2")
.HasComment("가입 일시");
b.Property("DeletedAt")
.HasColumnType("datetime2")
.HasComment("탈퇴 일시");
b.Property("DeviceInfo")
.HasMaxLength(400)
.HasColumnType("nvarchar(400)")
.HasComment("로그인 단말기 정보");
b.Property("Email")
.IsRequired()
.HasMaxLength(60)
.HasColumnType("nvarchar(60)")
.HasComment("이메일");
b.Property("EmailVerifiedAt")
.HasColumnType("datetime2")
.HasComment("이메일 인증 일시");
b.Property("Exp")
.HasColumnType("int")
.HasComment("경험치");
b.Property("FirstName")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasComment("본명(성)");
b.Property("Followed")
.HasColumnType("int")
.HasComment("구독자");
b.Property("Following")
.HasColumnType("int")
.HasComment("구독 중");
b.Property("FullName")
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasComment("본명");
b.Property("Gender")
.HasColumnType("int")
.HasComment("성별");
b.Property("GradeID")
.HasColumnType("int")
.HasComment("회원등급 ID");
b.Property("Icon")
.HasMaxLength(255)
.HasColumnType("nvarchar(255)")
.HasComment("아이콘");
b.Property("Intro")
.HasMaxLength(1000)
.HasColumnType("nvarchar(1000)")
.HasComment("자기소개");
b.Property("IsAdmin")
.HasColumnType("bit")
.HasComment("운영진 여부");
b.Property("IsAuthCertified")
.HasColumnType("bit")
.HasComment("본인 인증 여부");
b.Property("IsDenied")
.HasColumnType("bit")
.HasComment("차단 여부");
b.Property("IsEmailVerified")
.HasColumnType("bit")
.HasComment("이메일 인증 여부");
b.Property("IsWithdraw")
.HasColumnType("bit")
.HasComment("탈퇴 여부");
b.Property("LastEmailChangedAt")
.HasColumnType("datetime2")
.HasComment("마지막 이메일 변경 일시");
b.Property("LastLoginAt")
.HasColumnType("datetime2")
.HasComment("마지막 로그인 일시");
b.Property("LastLoginIp")
.HasMaxLength(15)
.HasColumnType("nvarchar(15)")
.HasComment("마지막 로그인 IP");
b.Property("LastName")
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasComment("본명(이름)");
b.Property("LastNameChangedAt")
.HasColumnType("datetime2")
.HasComment("마지막 별명 변경 일시");
b.Property("Name")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasComment("별명");
b.Property("Password")
.HasMaxLength(255)
.HasColumnType("nvarchar(255)")
.HasComment("비밀번호");
b.Property("PasswordUpdatedAt")
.HasColumnType("datetime2")
.HasComment("비밀번호 변경 일시");
b.Property("Phone")
.HasMaxLength(15)
.HasColumnType("nvarchar(15)")
.HasComment("연락처");
b.Property("Photo")
.HasMaxLength(255)
.HasColumnType("nvarchar(255)")
.HasComment("사진");
b.Property("SID")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasComment("SID");
b.Property("SignupIP")
.IsRequired()
.HasMaxLength(15)
.HasColumnType("nvarchar(15)")
.HasComment("회원가입 시 IP");
b.Property("Summary")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("한마디");
b.Property("UpdatedAt")
.HasColumnType("datetime2")
.HasComment("수정 일시");
b.HasKey("ID");
b.HasIndex("GradeID");
b.HasIndex(new[] { "CreatedAt" }, "IX_Member_CreatedAt");
b.HasIndex(new[] { "DeletedAt" }, "IX_Member_DeletedAt");
b.HasIndex(new[] { "Email" }, "IX_Member_Email")
.IsUnique();
b.HasIndex(new[] { "FullName" }, "IX_Member_FullName");
b.HasIndex(new[] { "Gender" }, "IX_Member_Gender");
b.HasIndex(new[] { "IsAdmin" }, "IX_Member_IsAdmin");
b.HasIndex(new[] { "IsAuthCertified" }, "IX_Member_IsAuthCertified");
b.HasIndex(new[] { "IsDenied" }, "IX_Member_IsDenied");
b.HasIndex(new[] { "IsEmailVerified" }, "IX_Member_IsEmailVerified");
b.HasIndex(new[] { "IsWithdraw" }, "IX_Member_IsWithdraw");
b.HasIndex(new[] { "Name" }, "IX_Member_Name")
.IsUnique()
.HasFilter("[Name] IS NOT NULL");
b.HasIndex(new[] { "Phone" }, "IX_Member_Phone");
b.HasIndex(new[] { "SID" }, "IX_Member_SID")
.IsUnique();
b.ToTable("Member", t =>
{
t.HasComment("회원 정보");
});
});
modelBuilder.Entity("bitforum.Models.Account.MemberApprove", b =>
{
b.Property("MemberID")
.HasColumnType("int")
.HasComment("회원 ID");
b.Property("IsDisclosureInvest")
.HasColumnType("bit")
.HasComment("투자 현황 공개 여부");
b.Property("IsReceiveEmail")
.HasColumnType("bit")
.HasComment("E-MAIL 수신 여부");
b.Property("IsReceiveNote")
.HasColumnType("bit")
.HasComment("쪽지 수신 여부");
b.Property("IsReceiveSMS")
.HasColumnType("bit")
.HasComment("SMS 수신 여부");
b.HasKey("MemberID");
b.ToTable("MemberApprove", t =>
{
t.HasComment("회원 동의 및 수신 여부");
});
});
modelBuilder.Entity("bitforum.Models.Account.MemberGrade", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("PK");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("CreatedAt")
.HasColumnType("datetime2")
.HasComment("등록 일시");
b.Property("Description")
.HasMaxLength(1000)
.HasColumnType("nvarchar(1000)")
.HasComment("설명");
b.Property("EngName")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("nvarchar(120)")
.HasComment("영문 명");
b.Property("Image")
.HasColumnType("nvarchar(max)")
.HasComment("이미지");
b.Property("IsActive")
.HasColumnType("bit")
.HasComment("사용 여부");
b.Property("KorName")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("nvarchar(120)")
.HasComment("한글 명");
b.Property("Order")
.HasColumnType("smallint")
.HasComment("순서");
b.Property("RequiredCoin")
.HasColumnType("int")
.HasComment("최소 코인(Coin)");
b.Property("RequiredExp")
.HasColumnType("int")
.HasComment("최소 경험치(Exp)");
b.Property("UpdatedAt")
.HasColumnType("datetime2")
.HasComment("수정 일시");
b.HasKey("ID");
b.HasIndex(new[] { "EngName" }, "IX_MemberGrade_EngName")
.IsUnique();
b.HasIndex(new[] { "IsActive" }, "IX_MemberGrade_IsActive");
b.HasIndex(new[] { "KorName" }, "IX_MemberGrade_KorName")
.IsUnique();
b.HasIndex(new[] { "Order" }, "IX_MemberGrade_Order");
b.ToTable("MemberGrade", t =>
{
t.HasComment("회원 등급");
});
});
modelBuilder.Entity("bitforum.Models.Account.RefreshToken", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("PK");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("CreatedAt")
.HasColumnType("datetime2")
.HasComment("등록 일시");
b.Property("Expiration")
.HasColumnType("datetime2")
.HasComment("만료 일시");
b.Property("MemberID")
.HasColumnType("int")
.HasComment("회원 ID");
b.Property("Token")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasComment("Token");
b.HasKey("ID");
b.ToTable("RefreshToken");
});
modelBuilder.Entity("bitforum.Models.BBS.Board", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("PK");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("BoardGroupID")
.HasColumnType("int")
.HasComment("분류 ID");
b.Property("Code")
.IsRequired()
.HasMaxLength(70)
.HasColumnType("nvarchar(70)")
.HasComment("게시판 주소");
b.Property("Comments")
.HasColumnType("int")
.HasComment("댓글 수");
b.Property("CreatedAt")
.HasColumnType("datetime2")
.HasComment("등록 일시");
b.Property("IsActive")
.HasColumnType("bit")
.HasComment("사용 여부");
b.Property("IsSearch")
.HasColumnType("bit")
.HasComment("검색 여부");
b.Property("Name")
.IsRequired()
.HasMaxLength(70)
.HasColumnType("nvarchar(70)")
.HasComment("게시판 이름");
b.Property("Order")
.HasColumnType("int")
.HasComment("순서");
b.Property("Posts")
.HasColumnType("int")
.HasComment("게시글 수");
b.Property("UpdatedAt")
.HasColumnType("datetime2")
.HasComment("수정 일시");
b.HasKey("ID");
b.HasIndex("BoardGroupID");
b.HasIndex(new[] { "Code" }, "IX_Board_Code")
.IsUnique();
b.HasIndex(new[] { "Comments" }, "IX_Board_Comments");
b.HasIndex(new[] { "IsActive" }, "IX_Board_IsActive");
b.HasIndex(new[] { "IsSearch" }, "IX_Board_IsSearch");
b.HasIndex(new[] { "Name" }, "IX_Board_Name");
b.HasIndex(new[] { "Order" }, "IX_Board_Order");
b.HasIndex(new[] { "Posts" }, "IX_Board_Posts");
b.ToTable("Board");
});
modelBuilder.Entity("bitforum.Models.BBS.BoardGroup", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("PK");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("Boards")
.HasColumnType("bigint")
.HasComment("게시판 수");
b.Property("Code")
.IsRequired()
.HasMaxLength(70)
.HasColumnType("nvarchar(70)")
.HasComment("게시판 분류 주소");
b.Property("Comments")
.HasColumnType("bigint")
.HasComment("댓글 수");
b.Property("CreatedAt")
.HasColumnType("datetime2")
.HasComment("등록 일시");
b.Property("Name")
.IsRequired()
.HasMaxLength(70)
.HasColumnType("nvarchar(70)")
.HasComment("게시판 분류 명");
b.Property("Order")
.HasColumnType("int")
.HasComment("순서");
b.Property("Posts")
.HasColumnType("bigint")
.HasComment("게시글 수");
b.Property("UpdatedAt")
.HasColumnType("datetime2")
.HasComment("수정 일시");
b.HasKey("ID");
b.HasIndex(new[] { "Boards" }, "IX_BoardGroup_Boards");
b.HasIndex(new[] { "Code" }, "IX_BoardGroup_Code");
b.HasIndex(new[] { "Comments" }, "IX_BoardGroup_Comments");
b.HasIndex(new[] { "Name" }, "IX_BoardGroup_Name");
b.HasIndex(new[] { "Order" }, "IX_BoardGroup_Order");
b.HasIndex(new[] { "Posts" }, "IX_BoardGroup_Posts");
b.ToTable("BoardGroup");
});
modelBuilder.Entity("bitforum.Models.BBS.BoardMeta", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("PK");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("BoardID")
.HasColumnType("int")
.HasComment("게시판 ID");
b.HasKey("ID");
b.HasIndex("BoardID");
b.ToTable("BoardMeta");
});
modelBuilder.Entity("bitforum.Models.BBS.Comment", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("PK");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("Blames")
.HasColumnType("bigint")
.HasComment("신고 수");
b.Property("BoardID")
.HasColumnType("int")
.HasComment("게시판 ID");
b.Property("Content")
.IsRequired()
.HasMaxLength(4000)
.HasColumnType("nvarchar(4000)")
.HasComment("댓글 내용");
b.Property("CreatedAt")
.HasColumnType("datetime2")
.HasComment("등록 일시");
b.Property("DeletedAt")
.HasColumnType("datetime2")
.HasComment("삭제 일시");
b.Property("Depth")
.HasColumnType("int")
.HasComment("댓글 깊이");
b.Property("Dislikes")
.HasColumnType("bigint")
.HasComment("싫어요");
b.Property("Email")
.HasMaxLength(60)
.HasColumnType("nvarchar(60)")
.HasComment("회원 이메일");
b.Property("IpAddress")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("IP");
b.Property("IsDeleted")
.HasColumnType("bit")
.HasComment("삭제 여부");
b.Property("IsSecret")
.HasColumnType("bit")
.HasComment("비밀글 여부");
b.Property("Likes")
.HasColumnType("bigint")
.HasComment("좋아요");
b.Property("MemberID")
.HasColumnType("int")
.HasComment("회원 ID");
b.Property("Name")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasComment("회원 이름");
b.Property("ParentID")
.HasColumnType("int")
.HasComment("부모 댓글 ID");
b.Property("Password")
.HasMaxLength(255)
.HasColumnType("nvarchar(255)")
.HasComment("댓글 비밀번호");
b.Property("PostID")
.HasColumnType("int")
.HasComment("게시글 ID");
b.Property("Replies")
.HasColumnType("bigint")
.HasComment("대댓글 수");
b.Property("SID")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasComment("회원 SID");
b.Property("UpdatedAt")
.HasColumnType("datetime2")
.HasComment("수정 일시");
b.Property("UserAgent")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("nvarchar(255)")
.HasComment("User-Agent");
b.HasKey("ID");
b.HasIndex("BoardID");
b.HasIndex("MemberID");
b.HasIndex("PostID");
b.HasIndex(new[] { "Blames" }, "IX_Comment_Blames");
b.HasIndex(new[] { "CreatedAt" }, "IX_Comment_CreatedAt");
b.HasIndex(new[] { "Dislikes" }, "IX_Comment_Dislikes");
b.HasIndex(new[] { "Email" }, "IX_Comment_Email");
b.HasIndex(new[] { "IsDeleted" }, "IX_Comment_IsDeleted");
b.HasIndex(new[] { "IsSecret" }, "IX_Comment_IsSecret");
b.HasIndex(new[] { "Likes" }, "IX_Comment_Likes");
b.HasIndex(new[] { "Name" }, "IX_Comment_Name");
b.HasIndex(new[] { "ParentID" }, "IX_Comment_ParentID");
b.HasIndex(new[] { "Replies" }, "IX_Comment_Replies");
b.HasIndex(new[] { "SID" }, "IX_Comment_SID");
b.ToTable("Comment");
});
modelBuilder.Entity("bitforum.Models.BBS.CommentMeta", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("PK");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("AllowDeleteProtection")
.HasColumnType("bit")
.HasComment("댓글 보호 기능 (삭제 시)");
b.Property("AllowDisLike")
.HasColumnType("bit")
.HasComment("댓글 비공감 사용");
b.Property("AllowLike")
.HasColumnType("bit")
.HasComment("댓글 공감 사용");
b.Property("AllowSecret")
.HasColumnType("bit")
.HasComment("비밀글 사용");
b.Property("AllowUpdateProtection")
.HasColumnType("bit")
.HasComment("댓글 보호 기능 (수정 시)");
b.Property("BlameHideCount")
.HasColumnType("int")
.HasComment("댓글 신고 시 숨김");
b.Property("BoardID")
.HasColumnType("int")
.HasComment("게시판 ID");
b.Property("ContentPlaceholder")
.HasMaxLength(1000)
.HasColumnType("nvarchar(1000)")
.HasComment("안내 문구");
b.Property("DeleteProtectionDays")
.HasColumnType("int")
.HasComment("댓글 삭제 금지 기간");
b.Property("EnableComment")
.HasColumnType("bit")
.HasComment("댓글 사용");
b.Property("EnableCommentUpdateLog")
.HasColumnType("bit")
.HasComment("댓글 변경 기록");
b.Property("EnableEditor")
.HasColumnType("bit")
.HasComment("웹 에디터 사용");
b.Property("MaxContentLength")
.HasColumnType("int")
.HasComment("최대 입력 글자");
b.Property("MinContentLength")
.HasColumnType("int")
.HasComment("최소 입력 글자");
b.Property("PerPage")
.HasColumnType("int")
.HasComment("목록 표시");
b.Property("ShowMemberIcon")
.HasColumnType("bit")
.HasComment("회원 아이콘 공개");
b.Property("ShowMemberPhoto")
.HasColumnType("bit")
.HasComment("회원 사진 공개");
b.Property("UpdateProtectionDays")
.HasColumnType("int")
.HasComment("댓글 수정 금지 기간");
b.HasKey("ID");
b.HasIndex("BoardID");
b.ToTable("CommentMeta");
});
modelBuilder.Entity("bitforum.Models.BBS.Post", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("PK");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("Blames")
.HasColumnType("bigint")
.HasComment("신고 수");
b.Property("BoardID")
.HasColumnType("int")
.HasComment("게시판 ID");
b.Property("Comments")
.HasColumnType("bigint")
.HasComment("댓글 수");
b.Property("Content")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasComment("내용");
b.Property("CreatedAt")
.HasColumnType("datetime2")
.HasComment("등록 일시");
b.Property("DeletedAt")
.HasColumnType("datetime2")
.HasComment("삭제 일시");
b.Property("Dislikes")
.HasColumnType("bigint")
.HasComment("싫어요");
b.Property("Email")
.HasMaxLength(60)
.HasColumnType("nvarchar(60)")
.HasComment("회원 이메일");
b.Property("Files")
.HasColumnType("smallint")
.HasComment("파일 수");
b.Property("Images")
.HasColumnType("smallint")
.HasComment("이미지 수");
b.Property("IpAddress")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("IP");
b.Property("IsDeleted")
.HasColumnType("bit")
.HasComment("삭제 여부");
b.Property("IsNotice")
.HasColumnType("bit")
.HasComment("일반 공지 여부");
b.Property("IsReply")
.HasColumnType("bit")
.HasComment("답변 여부");
b.Property("IsSecret")
.HasColumnType("bit")
.HasComment("비밀글 여부");
b.Property("IsSpeaker")
.HasColumnType("bit")
.HasComment("전체 공지 여부");
b.Property("LastCommentUpdatedAt")
.HasColumnType("datetime2")
.HasComment("마지막 댓글 일시");
b.Property("LastReplyUpdatedAt")
.HasColumnType("datetime2")
.HasComment("마지막 답변 일시");
b.Property("Likes")
.HasColumnType("bigint")
.HasComment("좋아요");
b.Property("MemberID")
.HasColumnType("int")
.HasComment("회원 ID");
b.Property("Name")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasComment("회원 이름");
b.Property("Password")
.HasMaxLength(255)
.HasColumnType("nvarchar(255)")
.HasComment("게시글 비밀번호");
b.Property("SID")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasComment("회원 SID");
b.Property("Subject")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("nvarchar(255)")
.HasComment("제목");
b.Property("Tags")
.HasColumnType("smallint")
.HasComment("Tag 수");
b.Property("UpdatedAt")
.HasColumnType("datetime2")
.HasComment("수정 일시");
b.Property("UserAgent")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("nvarchar(255)")
.HasComment("User-Agent");
b.Property("Videos")
.HasColumnType("smallint")
.HasComment("동영상 수");
b.Property("Views")
.HasColumnType("bigint")
.HasComment("조회 수");
b.HasKey("ID");
b.HasIndex("BoardID");
b.HasIndex("MemberID");
b.HasIndex(new[] { "Blames" }, "IX_Post_Blames");
b.HasIndex(new[] { "Comments" }, "IX_Post_Comments");
b.HasIndex(new[] { "CreatedAt" }, "IX_Post_CreatedAt");
b.HasIndex(new[] { "Dislikes" }, "IX_Post_Dislikes");
b.HasIndex(new[] { "Email" }, "IX_Post_Email");
b.HasIndex(new[] { "Files" }, "IX_Post_Files");
b.HasIndex(new[] { "Images" }, "IX_Post_Images");
b.HasIndex(new[] { "IsDeleted" }, "IX_Post_IsDeleted");
b.HasIndex(new[] { "IsNotice" }, "IX_Post_IsNotice");
b.HasIndex(new[] { "IsReply" }, "IX_Post_IsReply");
b.HasIndex(new[] { "IsSecret" }, "IX_Post_IsSecret");
b.HasIndex(new[] { "IsSpeaker" }, "IX_Post_IsSpeaker");
b.HasIndex(new[] { "LastCommentUpdatedAt" }, "IX_Post_LastCommentUpdatedAt");
b.HasIndex(new[] { "LastReplyUpdatedAt" }, "IX_Post_LastReplyUpdatedAt");
b.HasIndex(new[] { "Likes" }, "IX_Post_Likes");
b.HasIndex(new[] { "Name" }, "IX_Post_Name");
b.HasIndex(new[] { "SID" }, "IX_Post_SID");
b.HasIndex(new[] { "Subject" }, "IX_Post_Subject");
b.HasIndex(new[] { "Tags" }, "IX_Post_Tags");
b.HasIndex(new[] { "Videos" }, "IX_Post_Videos");
b.HasIndex(new[] { "Views" }, "IX_Post_Views");
b.ToTable("Post");
});
modelBuilder.Entity("bitforum.Models.BBS.PostMeta", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("PK");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("BoardID")
.HasColumnType("int")
.HasComment("게시판 ID");
b.HasKey("ID");
b.HasIndex("BoardID");
b.ToTable("PostMeta");
});
modelBuilder.Entity("bitforum.Models.Config", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("CreatedAt")
.HasColumnType("datetime2");
b.Property("Description")
.HasColumnType("nvarchar(max)");
b.Property("Key")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property("Value")
.HasColumnType("nvarchar(max)");
b.HasKey("ID");
b.HasIndex("Key")
.IsUnique();
b.ToTable("Config");
});
modelBuilder.Entity("bitforum.Models.Log.EmailChangeLog", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("PK");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("AfterEmail")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasComment("바꾼 이메일");
b.Property("BeforeEmail")
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasComment("이전 이메일");
b.Property("CreatedAt")
.HasColumnType("datetime2")
.HasComment("등록 일시");
b.Property("MemberID")
.HasColumnType("int")
.HasComment("회원 ID");
b.HasKey("ID");
b.HasIndex(new[] { "MemberID" }, "IX_EmailChangeLog_MemberID");
b.ToTable("EmailChangeLog", t =>
{
t.HasComment("이메일 변경 내역");
});
});
modelBuilder.Entity("bitforum.Models.Log.EmailLog", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("PK");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("CreatedAt")
.HasColumnType("datetime2")
.HasComment("등록 일시");
b.Property("FromAddress")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("nvarchar(120)")
.HasComment("발신 주소");
b.Property("FromName")
.HasMaxLength(60)
.HasColumnType("nvarchar(60)")
.HasComment("발신자");
b.Property("MemberID")
.HasColumnType("int")
.HasComment("회원 ID");
b.Property("Message")
.HasColumnType("nvarchar(max)")
.HasComment("내용");
b.Property("ProcessedAt")
.HasColumnType("datetime2")
.HasComment("처리 일시");
b.Property("Status")
.IsRequired()
.HasColumnType("nvarchar(20)")
.HasComment("처리 여부");
b.Property("Subject")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("nvarchar(255)")
.HasComment("제목");
b.Property("ToAddress")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("nvarchar(120)")
.HasComment("수신 주소");
b.Property("ToName")
.HasMaxLength(60)
.HasColumnType("nvarchar(60)")
.HasComment("수신자");
b.HasKey("ID");
b.HasIndex(new[] { "MemberID" }, "IX_EmailLog_MemberID");
b.HasIndex(new[] { "Status" }, "IX_EmailLog_Status");
b.ToTable("EmailLog");
});
modelBuilder.Entity("bitforum.Models.Log.LoginLog", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("PK");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("Account")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("nvarchar(120)")
.HasComment("로그인 시도한 계정");
b.Property("CreatedAt")
.HasColumnType("datetime2")
.HasComment("등록 일시");
b.Property("IpAddress")
.HasMaxLength(15)
.HasColumnType("nvarchar(15)")
.HasComment("IP Address");
b.Property("MemberID")
.HasColumnType("int")
.HasComment("회원 ID");
b.Property("Reason")
.HasMaxLength(255)
.HasColumnType("nvarchar(255)")
.HasComment("실패 이유");
b.Property("Referer")
.HasColumnType("nvarchar(max)")
.HasComment("이전 페이지 주소");
b.Property("Success")
.HasColumnType("bit")
.HasComment("로그인 성공 여부 (0: 실패, 1: 성공)");
b.Property("Url")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)")
.HasComment("요청 주소");
b.Property("UserAgent")
.HasMaxLength(512)
.HasColumnType("nvarchar(512)")
.HasComment("User Agent");
b.HasKey("ID");
b.HasIndex("MemberID");
b.ToTable("LoginLog", t =>
{
t.HasComment("로그인 기록");
});
});
modelBuilder.Entity("bitforum.Models.Log.NameChangeLog", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("PK");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("AfterName")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasComment("바꾼 별명");
b.Property("BeforeName")
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasComment("이전 별명");
b.Property("CreatedAt")
.HasColumnType("datetime2")
.HasComment("등록 일시");
b.Property("MemberID")
.HasColumnType("int")
.HasComment("회원 ID");
b.HasKey("ID");
b.HasIndex(new[] { "MemberID" }, "IX_NameChangeLog_MemberID");
b.ToTable("NameChangeLog", t =>
{
t.HasComment("별명 변경 내역");
});
});
modelBuilder.Entity("bitforum.Models.Page.Banner.BannerItem", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("PK");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("CreatedAt")
.HasColumnType("datetime2")
.HasComment("등록 일시");
b.Property("EndAt")
.HasColumnType("datetime2")
.HasComment("사용 기간 - 종료");
b.Property("Height")
.HasColumnType("int")
.HasComment("세로 크기");
b.Property("Image")
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)")
.HasComment("이미지");
b.Property("IsActive")
.HasColumnType("bit")
.HasComment("사용 여부");
b.Property("Link")
.HasMaxLength(255)
.HasColumnType("nvarchar(255)")
.HasComment("주소");
b.Property("Order")
.HasColumnType("int")
.HasComment("순서");
b.Property("PositionID")
.HasColumnType("int")
.HasComment("배너 위치 ID");
b.Property("StartAt")
.HasColumnType("datetime2")
.HasComment("사용 기간 - 시작");
b.Property("Subject")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("nvarchar(255)")
.HasComment("배너 명");
b.Property("UpdatedAt")
.HasColumnType("datetime2")
.HasComment("수정 일시");
b.Property("Views")
.HasColumnType("int")
.HasComment("조회 수");
b.Property("Width")
.HasColumnType("int")
.HasComment("가로 크기");
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("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("PK");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("Code")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("nvarchar(30)")
.HasComment("위치 구분");
b.Property("CreatedAt")
.HasColumnType("datetime2")
.HasComment("등록 일시");
b.Property("IsActive")
.HasColumnType("bit")
.HasComment("사용 여부");
b.Property("Subject")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("nvarchar(255)")
.HasComment("위치 명");
b.Property("UpdatedAt")
.HasColumnType("datetime2")
.HasComment("수정 일시");
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("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("PK");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("Code")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("nvarchar(30)")
.HasComment("주소");
b.Property("Content")
.HasColumnType("nvarchar(max)")
.HasComment("내용");
b.Property("CreatedAt")
.HasColumnType("datetime2")
.HasComment("등록 일시");
b.Property("IsActive")
.HasColumnType("bit")
.HasComment("사용 여부");
b.Property("Subject")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("nvarchar(120)")
.HasComment("제목");
b.Property("UpdatedAt")
.HasColumnType("datetime2")
.HasComment("수정 일시");
b.Property("Views")
.HasColumnType("int")
.HasComment("조회 수");
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("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasComment("PK");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property