A bike rental application with SQLite
Adapted as a Python console application with the "Bike Shop" theme of the product purchase - rental system logic.
-
Buying or renting bikes within stock
-
Payment system that displays the number of banknotes you need to complete the payment.
- Like this, ( (You can pay with 100 banknotes) How many 100 TRY ?: )
-
Ability to view order history in detail
-
Ability to return product
This is how SQL queries were written to avoid SQL Injection.
self.cursor.execute(f"UPDATE {table_name} SET {info_name} = {new_value} WHERE id = ?", (info_id,))
- Firstly, Enter '1' to reach 'Buy Bike' section
- Then enter ID of bike that you want to buy
- Follow the necessary steps
- Firstly, Enter '2' to reach 'Rent Bike' section
- Then enter ID of bike that you want to rent
- Choose that what kind of hire you want ( Hourly or Daily )
- Follow the necessary steps
- Firstly, Enter '3' to reach 'Show My Order History' section
- Then enter ID of order that you want to return
- Enter '1' if you want to return a bike that you bought
- Enter '2' if you want to return a bike that you rented
- Follow the necessary steps