basic_display.py 444 B

12345678910111213141516171819
  1. from model.product import Product
  2. from model.ord import Ord
  3. class BasicDisplay():
  4. def product(self, p):
  5. print(p.id ,':', p.name)
  6. def productList(self, pList):
  7. for pRaw in pList:
  8. p = Product(pRaw)
  9. self.product(p)
  10. def bookOrder(self, b):
  11. print(b.id, ':', b.date)
  12. def bookOrderList(self, bList):
  13. for bRaw in bList:
  14. b = Ord(bRaw)
  15. self.bookOrder(b)