This commit branch has been muddled with changes that are out of scope and cover more than just the models. Specifically it includes completion of basic guest related models, database access, command line interface integration and preventing SQL injection. Total summary of changes: **IMPORTANT CHANGE: All queries are now parameterized to prevent SQL injections. Prior versions are subject to it since the strings were built. - HotelManager This class is used to provide database operations that are outside of scope from a given model. Furthermore if there is no model to work off of, such as creating a new model based off an existing entry, these functions live outside of the model since it makes no sense for models to contain functions where it would retrieve itself with no context. Realistically this could be placed in an empty constructor and address itself, however, for now this functionality has been moved off the model since it is a one use and is not guaranteed to generate a guest. Some functionality for the coming employee management functions are already in there since they share overlap with the guest module. Specifically GetBaseRate for checking and getting the base rate. - DatabaseManager This class has mostly migrated functionality out or switch to parameterized query generation to prevent SQL injections. - Guest, Reservation, and Transaction Classes Migrated functionality to create the database entry and a new entry of guest upon creation as well as update them. - Program (Terminal app) Fully integrated the guest module. Has not undergone extensive testing but does work as of this commit.
8.2 KiB
8.2 KiB