## ## interfaces.py from zope.interface import Attribute, invariant from zope import schema from waeup.sirp.interfaces import IWAeUPObject class IHostelsContainer(IWAeUPObject): """A container for all kind of hostel objects. """ class IHostel(IWAeUPObject): """A base representation of hostels. """ def loggerInfo(ob_class, comment): """Adds an INFO message to the log file """ #hostel_id = Attribute('Hostel Id') hostel_id = schema.TextLine( title = u'Hostel Id', readonly = True, ) sort_id = schema.Int( title = u'Sort Id', required = True, default = 10, ) hostel_name = schema.TextLine( title = u'Hall Name', required = True, default = u'hostel_1', ) nr_of_blocks = schema.Int( title = u'Number of Blocks', required = True, default = 3, ) nr_of_floors = schema.Int( title = u'Number of Blocks', required = True, default = 3, ) rooms_per_floor = schema.Int( title = u'Number of Blocks', required = True, default = 20, ) beds_per_room = schema.Int( title = u'Number of Blocks', required = True, default = 6, )