first commit
This commit is contained in:
448
backend/Migrations/AppDbContextModelSnapshot.cs
Normal file
448
backend/Migrations/AppDbContextModelSnapshot.cs
Normal file
@@ -0,0 +1,448 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using backend.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace backend.Migrations
|
||||
{
|
||||
[DbContext(typeof(AppDbContext))]
|
||||
partial class AppDbContextModelSnapshot : 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("backend.Models.KhatmItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("Points")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("KhatmItems");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = 1,
|
||||
Points = 5,
|
||||
Title = "ختم نادعلی",
|
||||
Url = "https://example.com/khatm/nadali"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 2,
|
||||
Points = 10,
|
||||
Title = "خطبه غدیر",
|
||||
Url = "https://example.com/khatm/ghadir"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 3,
|
||||
Points = 7,
|
||||
Title = "دعای توسل",
|
||||
Url = "https://example.com/khatm/tavassol"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("backend.Models.QuizQuestion", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("CorrectOption")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Option1")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<string>("Option2")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<string>("Option3")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<string>("Option4")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<string>("QuestionText")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("QuizQuestions");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = 1,
|
||||
CorrectOption = 3,
|
||||
Option1 = "در مورد ثمرات ولایت و محبت اهلبیت",
|
||||
Option2 = "در مورد جنبه غضب الهی",
|
||||
Option3 = "در مورد امام مهدی علیهالسلام",
|
||||
Option4 = "اقرار لسانی",
|
||||
QuestionText = "هشتمین بخش خطبه غدیر در چه موضوعی است؟"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 2,
|
||||
CorrectOption = 1,
|
||||
Option1 = "این لقب به دستور مستقیم از جانب خداوند به ایشان داده شد",
|
||||
Option2 = "پیامبر اکرم، خودشان این لقب را انتخاب کردند",
|
||||
Option3 = "مردم به علت فضائل بسیار ایشان، این لقب را انتخاب کردند",
|
||||
Option4 = "به درخواست خود ایشان بود",
|
||||
QuestionText = "لقب «امیرالمؤمنین» توسط چه کسی به مولا علی علیهالسلام اطلاق شد؟"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 3,
|
||||
CorrectOption = 3,
|
||||
Option1 = "کسانی که خبر اسلام به آنان نرسیده است",
|
||||
Option2 = "کسانی که در مدیریت زمان ضعیف هستند",
|
||||
Option3 = "دشمنان آل محمد (صلیاللهعلیهوآله)",
|
||||
Option4 = "اهل کتاب",
|
||||
QuestionText = "طبق فرمایش پیامبر اکرم در غدیر، عبارت «إِنَّ الإِنسَانَ لَفِي خُسْرٍ»، «انسان در زیان است» درباره چه کسانی است؟"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 4,
|
||||
CorrectOption = 4,
|
||||
Option1 = "آيه 31 سوره نور",
|
||||
Option2 = "آيه 58 – 60 سوره نور",
|
||||
Option3 = "آيه 59 – 60 سوره احزاب",
|
||||
Option4 = "آيه 59 – 60 سوره نساء",
|
||||
QuestionText = "كدام يك از آيات زير مربوط به حجاب نمي باشد؟"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 5,
|
||||
CorrectOption = 3,
|
||||
Option1 = "پوشش – عفاف",
|
||||
Option2 = "ترك نظر – پوشش",
|
||||
Option3 = "ترك نظر – پاكدامني",
|
||||
Option4 = "پوشش – پاكدامني",
|
||||
QuestionText = "اين قسمت از آيه 31 سوره نور « قل للمومنات يغضضن من ابصار هن و يحفظن فروجهن» بيانگر كدام دو تكليف است؟"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 6,
|
||||
CorrectOption = 1,
|
||||
Option1 = "زنان سالخورده اي كه اميدي به ازدواج ايشان نمي باشد",
|
||||
Option2 = "بردگان و مملوكان",
|
||||
Option3 = "طفيلياني كه نيازي به زن ندارند",
|
||||
Option4 = "اطفال نابالغ ولو مميز نزديك به بلوغ",
|
||||
QuestionText = "منظور از (( قواعد )) در سوره نور آيات 58-60 چه كساني هستند؟"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 7,
|
||||
CorrectOption = 3,
|
||||
Option1 = "سوره کهف آیه ۲۸",
|
||||
Option2 = "سوره انعام آیه ۶۱",
|
||||
Option3 = "سوره زمر ۵۶",
|
||||
Option4 = "سوره طه ۴۵",
|
||||
QuestionText = "در کدام آیه از قرآن مجید خداوند می فرماید که درباره علی تفریط و کوتاهی نکنید؟"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 8,
|
||||
CorrectOption = 2,
|
||||
Option1 = "تعيين امامت ،علی عليه السلام",
|
||||
Option2 = "تبليغ امامت، علی عليه السلام",
|
||||
Option3 = "تعيين و تبليغ امامت، علی عليه السلام",
|
||||
Option4 = "سپردن تعیین امامت به مردم",
|
||||
QuestionText = "طبق آیه 67 سوره مائده وظيفه رسول خدا در برابر امامت چيست و آيه در شأن چه كسی نازل شده است؟\n«يَا أَيُّهَا الرَّسُولُ بَلِّغْ مَا أُنْزِلَ إِلَيْكَ مِنْ رَبِّكَ وَإِنْ لَمْ تَفْعَلْ فَمَا بَلَّغْتَ رِسَالَتَهُ ...»"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 9,
|
||||
CorrectOption = 1,
|
||||
Option1 = "عید غدیر، روز تبلیغ و معرفی امیرالمومنین به عنوان جانشین پیامبر",
|
||||
Option2 = "روز جمعه",
|
||||
Option3 = "عید قربان، حج تمتع",
|
||||
Option4 = "عید فطر، پایان یک ماه بندگی",
|
||||
QuestionText = "طبق روایت امام رضا علیه السلام برترین عید امت اسلامی کدام است؟"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 10,
|
||||
CorrectOption = 4,
|
||||
Option1 = "با ابلاغ ولایت و امامت امیرالمومنین(علیه السلام) توسط پیامبر اکرم(صلی الله علیه و آله) دین کامل گشت",
|
||||
Option2 = "خداوند با ابلاغ ولایت و امامت امیرالمومنین(علیه السلام) و یازده فرزند پاکشان از اسلام اعلام رضایت فرمودند",
|
||||
Option3 = "شرط اینکه دین شخص مسلمان مورد رضایت خداوند متعال قرار گیرد پذیرش ولایت و امامت ائمه (علیهم السلام) است",
|
||||
Option4 = "امامت از فروع دین بوده و قبول یا عدم پذیرش آن لطمهای به آن شخص وارد نمیکند",
|
||||
QuestionText = "با توجه به مطلبی که در آیه شریفه «الْيَوْمَ أَكْمَلْتُ لَكُمْ دِينَكُمْ وَ أَتْمَمْتُ عَلَيْكُمْ نِعْمَتِي وَ رَضِيتُ لَكُمُ الْإِسْلامَ دِينا» در روز غدیر نازل گشته است. کدام گزینه صحیح نمیباشد؟"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("backend.Models.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Contact")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("TrackingCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(4)
|
||||
.HasColumnType("nvarchar(4)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Contact")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("TrackingCode")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("backend.Models.UserKhatmSelection", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<bool>("IsSelected")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("KhatmItemId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("LastModified")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("UserId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("KhatmItemId");
|
||||
|
||||
b.HasIndex("UserId", "KhatmItemId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("UserKhatmSelections");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("backend.Models.UserQuizAnswer", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<bool>("IsCorrect")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("QuestionId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("SelectedOption")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("UserQuizAttemptId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("QuestionId");
|
||||
|
||||
b.HasIndex("UserQuizAttemptId");
|
||||
|
||||
b.ToTable("UserQuizAnswers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("backend.Models.UserQuizAttempt", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("CompletedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("CorrectAnswersCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ParticipationPoints")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TotalQuizPoints")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("UserId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("UserQuizAttempts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("backend.Models.UserTotalScore", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("TotalPoints")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("UserId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("UserTotalScores");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("backend.Models.UserKhatmSelection", b =>
|
||||
{
|
||||
b.HasOne("backend.Models.KhatmItem", "KhatmItem")
|
||||
.WithMany("UserSelections")
|
||||
.HasForeignKey("KhatmItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("backend.Models.User", "User")
|
||||
.WithMany("KhatmSelections")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("KhatmItem");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("backend.Models.UserQuizAnswer", b =>
|
||||
{
|
||||
b.HasOne("backend.Models.QuizQuestion", "Question")
|
||||
.WithMany("Answers")
|
||||
.HasForeignKey("QuestionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("backend.Models.UserQuizAttempt", "QuizAttempt")
|
||||
.WithMany("Answers")
|
||||
.HasForeignKey("UserQuizAttemptId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Question");
|
||||
|
||||
b.Navigation("QuizAttempt");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("backend.Models.UserQuizAttempt", b =>
|
||||
{
|
||||
b.HasOne("backend.Models.User", "User")
|
||||
.WithOne("QuizAttempt")
|
||||
.HasForeignKey("backend.Models.UserQuizAttempt", "UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("backend.Models.UserTotalScore", b =>
|
||||
{
|
||||
b.HasOne("backend.Models.User", "User")
|
||||
.WithOne("TotalScore")
|
||||
.HasForeignKey("backend.Models.UserTotalScore", "UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("backend.Models.KhatmItem", b =>
|
||||
{
|
||||
b.Navigation("UserSelections");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("backend.Models.QuizQuestion", b =>
|
||||
{
|
||||
b.Navigation("Answers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("backend.Models.User", b =>
|
||||
{
|
||||
b.Navigation("KhatmSelections");
|
||||
|
||||
b.Navigation("QuizAttempt");
|
||||
|
||||
b.Navigation("TotalScore");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("backend.Models.UserQuizAttempt", b =>
|
||||
{
|
||||
b.Navigation("Answers");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user