import java.sql.SQLException;

import src.models.UserModel;
import src.squirrel.Database;
import src.squirrel.ModelManager;

public class Main {
    public static void main(String[] args) throws SQLException {
        ModelManager.initializeModels();
        Database.migrate = conn -> src.Migration.run(conn);
        Database.getConnection();

        UserModel userModel = ModelManager.get(UserModel.class);
        UserModel user = userModel.register("Jack", "jack@example.com", "1234");
        System.out.println("Registered user: " + user);

        Database.close();
    }
}
