Add ORM models for the pixel grids
- add Grid, Pixel, and AddressPixelAssociation ORM models - each Grid belongs to a City an is characterized by the side_length of all the square Pixels contained in it - Pixels aggregate Addresses => many-to-many relationship (that is modeled with SQLAlchemy's Association Pattern to implement a couple of constraints)
This commit is contained in:
parent
6cb4be80f6
commit
f996376b13
15 changed files with 665 additions and 36 deletions
|
|
@ -1,11 +1,14 @@
|
|||
"""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
|
||||
from urban_meal_delivery.db.addresses import Address
|
||||
from urban_meal_delivery.db.addresses_pixels import AddressPixelAssociation
|
||||
from urban_meal_delivery.db.cities import City
|
||||
from urban_meal_delivery.db.connection import make_engine
|
||||
from urban_meal_delivery.db.connection import make_session_factory
|
||||
from urban_meal_delivery.db.couriers import Courier
|
||||
from urban_meal_delivery.db.customers import Customer
|
||||
from urban_meal_delivery.db.grids import Grid
|
||||
from urban_meal_delivery.db.meta import Base
|
||||
from urban_meal_delivery.db.orders import Order
|
||||
from urban_meal_delivery.db.pixels import Pixel
|
||||
from urban_meal_delivery.db.restaurants import Restaurant
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue