import { DatabaseService, EntitySchemaTypes } from "@autoplex/database";
import { createConnection } from "typeorm";
import * as entities from "../database/entities";

export default class Database extends DatabaseService
{
	/**
	 * The entities to use
	 */
	protected entities: EntitySchemaTypes[] = Object.values(entities);

	/**
	 * Override the createConnection function to correctly register with the connection manager
	 */
	protected createConnection = createConnection;
}
