from zope.interface import Interface from zope.schema import Text, TextLine, Int, Date, Bool, Choice, Field from zope.app.container.constraints import containers, contains from zope.app.container.interfaces import IContainer, IContained class IFosterRecord(Interface): """A FosterRecord. """ title = TextLine( title=u'Title', description=u'Title of FosterRecord', required=True ) class IFosterSource(Interface): """A FosterSource. """ title = TextLine( title=u'Title', description=u'Title of FosterSource', required=True ) class IFosterGroup(Interface): """A FosterGroup. """ title = TextLine( title=u'Title', description=u'Title of FosterSource', required=True ) class IFoster(Interface): """Information about a foster. """ # id = Int( # title=u'Foster ID', # description=u'ID number of the foster', # required=True # ) nickname = TextLine( title=u'Nickname', description=u'Nickname of the foster', required=False ) history = Text( title=u'History', description=u'History of the foster', required=False ) markings = Text( title=u'Markings', description=u'The foster\'s markings', required=True ) personality = Text( title=u'Personality', description=u'Personality of the foster', required=False ) health = Choice( title=u'Health', description=u'Health of the foster', values=('Good', 'Minor', 'Major', 'Undetermined'), required=True ) healthInfo = Text( title=u'Health Information', description=u'Additional health information', required=False ) bornOn = Date( title=u'Born On', description=u'Date on which foster was born', required=True ) bornApprox = Bool( title=u'Approx.', description=u'Approximate date', required=True ) gender = Choice( title=u'Gender', description=u'Gender of the foster', values=('Male', 'Female', 'Undetermined'), required=True ) fixed = Bool( title=u'Fixed', description=u'If the foster has been fixed', required=True ) fixedOn = Date( title=u'Fixed On', description=u'Date the foster was fixed', required=False ) receivedOn = Date( title=u'Received On', description=u'Date the foster was received', required=True ) adoptedOn = Date( title=u'Adopted On', description=u'Date the foster was adopted', required=False ) adoptedBy = TextLine( title=u'Adopted By', description=u'Person who adopted the foster', required=False ) pregnancyWatch = Choice( title=u'Pregnancy Watch', description=u'Pregnancy watch status', values=('On', 'Cleared', 'Pregnant', 'N/A'), required=True ) pregnancyWatchEndsOn = Date( title=u'Pregnancy Watch Ends On', description=u'Date when pregnancy watch expires', required=False ) transferedOn = Date( title=u'Ttransfered On', description=u'Date of transfer', required=False ) transferedTo = TextLine( title=u'Transfered To', description=u'Person to which foster was transfered', required=False ) class IFosterRecordContained(IContained): """Implemented by objects that can be contained in a FosterRecord. """ containers(IFosterRecord) class IFosterSourceContainer(IContainer): """Implemented by objects that can contain a FosterSource. """ contains(IFosterSource) class IFosterSourceContained(IContained): """Implemented by objects that can be contained in a FosterSource. """ containers(IFosterSourceContainer) class IFosterGroupContainer(IContainer): """Implemented by objects that can contain a FosterGroup. """ contains(IFosterGroup) class IFosterGroupContained(IContained): """Implemented by objects that can be contained in a FosterGroup. """ containers(IFosterGroupContainer) class IFosterContainer(IContainer): """Implemented by objects that can contain a Foster. """ contains(IFoster)