using Microsoft.EntityFrameworkCore;
using VeterinaryDatabaseImplement.Models;

namespace VeterinaryDatabaseImplement
{
	public class VeterinaryDatabase : DbContext
	{
		protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
		{
			if (optionsBuilder.IsConfigured == false)
			{
				optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=VeterinaryDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"
				);
			}
			base.OnConfiguring(optionsBuilder);
		}
		public virtual DbSet<Doctor> Doctors { set; get; }
		public virtual DbSet<Drug> Drugs { set; get; }
		public virtual DbSet<Medication> Medications { set; get; }
		public virtual DbSet<Service> Services { set; get; }
		public virtual DbSet<ServiceMedication> ServiceMedications { set; get; }
		public virtual DbSet<DrugMedication> DrugMedications{ set; get; }
		public virtual DbSet<Owner> Owners { set; get; }
		public virtual DbSet<Pet> Pets { set; get; }
		public virtual DbSet<Visit> Visits { set; get; }
		public virtual DbSet<Purchase> Purchases { set; get; }
		public virtual DbSet<VisitPet> VisitPets { set; get; }
		public virtual DbSet<PurchasePet> PurchasePets { set; get; }
	}
}
