source: main/waeup.sirp/trunk/src/waeup/sirp/hostels/interfaces.py @ 6957

Last change on this file since 6957 was 6956, checked in by Henrik Bettermann, 14 years ago

Add more fields and fix code.

  • Property svn:keywords set to Id
File size: 1.3 KB
Line 
1##
2## interfaces.py
3from zope.interface import Attribute, invariant
4from zope import schema
5from waeup.sirp.interfaces import IWAeUPObject
6
7class IHostelsContainer(IWAeUPObject):
8    """A container for all kind of hostel objects.
9
10    """
11
12class IHostel(IWAeUPObject):
13    """A base representation of hostels.
14
15    """
16
17    def loggerInfo(ob_class, comment):
18        """Adds an INFO message to the log file
19        """
20
21    #hostel_id = Attribute('Hostel Id')
22
23    hostel_id = schema.TextLine(
24        title = u'Hostel Id',
25        readonly = True,
26        )
27
28    sort_id = schema.Int(
29        title = u'Sort Id',
30        required = True,
31        default = 10,
32        )
33
34    hostel_name = schema.TextLine(
35        title = u'Hall Name',
36        required = True,
37        default = u'hostel_1',
38        )
39
40    nr_of_blocks = schema.Int(
41        title = u'Number of Blocks',
42        required = True,
43        default = 3,
44        )
45
46    nr_of_floors = schema.Int(
47        title = u'Number of Blocks',
48        required = True,
49        default = 3,
50        )
51
52    rooms_per_floor = schema.Int(
53        title = u'Number of Blocks',
54        required = True,
55        default = 20,
56        )
57
58    beds_per_room = schema.Int(
59        title = u'Number of Blocks',
60        required = True,
61        default = 6,
62        )
63
Note: See TracBrowser for help on using the repository browser.