- use SQLAlchemy (and PostgreSQL) to model the ORM layer
- add the following models:
+ Address => modelling all kinds of addresses
+ City => model the three target cities
+ Courier => model the UDP's couriers
+ Customer => model the UDP's customers
+ Order => model the orders received by the UDP
+ Restaurant => model the restaurants active on the UDP
- so far, the emphasis lies on expression the Foreign Key
and Check Constraints that are used to validate the assumptions
inherent to the cleanded data
- provide database-independent unit tests with 100% coverage
- provide additional integration tests ("e2e") that commit data to
a PostgreSQL instance to validate that the constraints work
- adapt linting rules a bit
11 lines
663 B
Python
11 lines
663 B
Python
"""Provide the ORM models and a connection to the database."""
|
|
|
|
from urban_meal_delivery.db.addresses import Address # noqa:F401
|
|
from urban_meal_delivery.db.cities import City # noqa:F401
|
|
from urban_meal_delivery.db.connection import make_engine # noqa:F401
|
|
from urban_meal_delivery.db.connection import make_session_factory # noqa:F401
|
|
from urban_meal_delivery.db.couriers import Courier # noqa:F401
|
|
from urban_meal_delivery.db.customers import Customer # noqa:F401
|
|
from urban_meal_delivery.db.meta import Base # noqa:F401
|
|
from urban_meal_delivery.db.orders import Order # noqa:F401
|
|
from urban_meal_delivery.db.restaurants import Restaurant # noqa:F401
|