haldis/app/fatmodels.py
Wout Schellaert a6f71195fd First data
2016-09-10 16:52:46 +02:00

20 lines
344 B
Python

from models import User, Location, Order, OrderItem
class CountableModel:
@classmethod
def amount(cls):
return cls.query.count()
class FatLocation(Location, CountableModel): pass
class FatOrder(Order, CountableModel): pass
class FatUser(User, CountableModel): pass
class FatOrderItem(OrderItem, CountableModel): pass