using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Entities.Contracts;

namespace TechHelper.Context
{
	public class ApplicationContext : IdentityDbContext<User, IdentityRole<Guid>, Guid>
	{
		public ApplicationContext(DbContextOptions options)
			: base(options) { }

		public DbSet<School> Schools { get; set; }
		public DbSet<Grade> Grades { get; set; }
		public DbSet<Class> Classes { get; set; }	
		public DbSet<Exam> Exams { get; set; }
		public DbSet<ExamQuestion> ExamQuestions { get; set; }	
		public DbSet<ExamAttachment>  ExamAttachments{ get; set; }
		public DbSet<ExamType> ExamTypes { get; set; }
		public DbSet<Question> Questions { get; set; }	
		public DbSet<Submission> Submissions { get; set; }
		public DbSet<SubmissionDetail> SubmissionDetails { get; set; }	
		public DbSet<QuestionContext> QuestionContexts { get; set; }	

		//protected override void OnModelCreating(ModelBuilder builder)
		//{
		//	base.OnModelCreating(builder);
		//	builder.ApplyConfiguration(new RoleConfiguration());
		//	builder.ApplyConfiguration(new AssignmentConfiguration());
		//	builder.ApplyConfiguration(new AssignmentClassConfiguration());
		//	builder.ApplyConfiguration(new AssignmentQuestionConfiguration());
		//	builder.ApplyConfiguration(new ClassConfiguration());
		//	builder.ApplyConfiguration(new QuestionConfiguration());
		//	builder.ApplyConfiguration(new SubmissionConfiguration());
		//	builder.ApplyConfiguration(new SubmissionDetailConfiguration());
		//}
	}
}
