How lesykkk/drivehub works
Project type and scope
• DriveHub is a Django-based full-stack web platform for buying/selling vehicles.
• Your custom instruction is “Database tables only,” so we will focus solely on the relational schema layer.
Main components (database tables)
• auth_user (or your custom User model in account/models.py)
• account_favourite (stores users’ favorite adverts)
• advert_advert (the vehicle listing)
• advert_filter (advanced search/filter presets)
• advert_review (ratings & reviews for adverts)
• (Plus standard Django tables: auth_group, auth_permission, django_migrations, etc., as needed.)
Relationships and interactions
• One-to-many:
• User → Advert (each user can post many adverts)
• User → Review (each user can write many reviews)
• Advert → Review (each advert has many reviews)
• Many-to-many (through a join table):
• User ↔ Advert via Favourite (users can favorite many adverts; adverts can be favorited by many users)
• One-to-one or one-to-many for Profile/Settings depending on your implementation.
Architectural pattern
• Simple relational schema (SQLite3)
• Standard normalized relations: separate tables for entities, join tables for M2M, foreign keys for 1-to-many.