iro/model/schema.py
changeset 308 a891fdd0c1a9
parent 294 0e75bd39767d
child 312 42fd5075a5d1
equal deleted inserted replaced
307:6acae4210716 308:a891fdd0c1a9
   156     """connected :class:`Offer` object"""
   156     """connected :class:`Offer` object"""
   157     
   157     
   158     def __init__(self, **kwargs):
   158     def __init__(self, **kwargs):
   159         Base.__init__(self,**kwargs)
   159         Base.__init__(self,**kwargs)
   160 
   160 
       
   161 class Status(Base):
       
   162     """ Status updates from external"""
       
   163     __tablename__ = "status"
       
   164 
       
   165     id = Column(Integer, Sequence('status_id_seq'), primary_key=True)
       
   166     """primary key of the message"""
       
   167 
       
   168     date = Column(DateTime)
       
   169     """date of status message"""
       
   170 
       
   171     recipient = Column(String(100))
       
   172     """string representation of the recipient"""
       
   173 
       
   174     exID = Column(String(100))
       
   175     """external API id """
       
   176 
       
   177     status = Column(Integer)
       
   178     """ status of the message"""
       
   179 
       
   180     sender = Column(String(100))
       
   181     """ sender of the message """
       
   182 
       
   183     data = Column(String(2550))
       
   184     """ rest of the data """
   161 
   185 
   162 class Job(Base):
   186 class Job(Base):
   163     """A complete Job.
   187     """A complete Job.
   164 
   188 
   165     - **status** show the status of the job (``init``, ``started``, ``sending``, ``sended`` or ``error``). 
   189     - **status** show the status of the job (``init``, ``started``, ``sending``, ``sended`` or ``error``).