using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using SPWA.DataAccess.Data;
using SPWA.DataAccess.Data.Models;
using Project.Data.Project;

namespace SPWA.Data
{
    public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
    {
        public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
            : base(options)
        {
        }

        public DbSet<Course> Course { get; set; }
        public DbSet<Project.Data.Project.Project> Project { get; set; }
        public DbSet<CourseQuestions> CourseQuestion { get; set; }
        public DbSet<Email> Email { get; set; }
        public DbSet<Evaluation> Evaluation { get; set; }
        public DbSet<Grade> Grade { get; set; }
        public DbSet<Placeholder> Placeholder { get; set; }
        public DbSet<Question> Question { get; set; }
        public DbSet<Template> Template { get; set; }
        public DbSet<Term> Term { get; set; }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            modelBuilder.Entity<Project.Data.Project.Project>().ToTable("Project");
            modelBuilder.Entity<Course>().ToTable("Course");
            modelBuilder.Entity<CourseQuestions>().ToTable("CourseQuestions");
            modelBuilder.Entity<Email>().ToTable("Email");
            modelBuilder.Entity<Evaluation>().ToTable("Evaluation");
            modelBuilder.Entity<Grade>().ToTable("Grade");
            modelBuilder.Entity<Placeholder>().ToTable("Placeholder");
            modelBuilder.Entity<Question>().ToTable("Question");
            modelBuilder.Entity<Template>().ToTable("Template");
            modelBuilder.Entity<Term>().ToTable("Term");

            
        }



    }
}
