using AfRApay.Web.Backend.Database.Tables;
using Microsoft.EntityFrameworkCore;

namespace AfRApay.Web.Backend.Database;

public partial class DatabaseContext : DbContext {
	public DatabaseContext() { }
	public DatabaseContext(DbContextOptions<DatabaseContext> options) : base(options) { }

	public virtual DbSet<Card>   Cards  { get; set; } = null!;
	public virtual DbSet<User>   Users  { get; set; } = null!;
	public virtual DbSet<Config> Config { get; set; } = null!;

	protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) => optionsBuilder.UseSqlite("Data Source=database.db");

	protected override void OnModelCreating(ModelBuilder modelBuilder) {
		OnModelCreatingPartial(modelBuilder);
	}

	partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}
