Ignore:
Timestamp:
07/06/10 20:14:11 (23 months ago)
Author:
dart
Message:

LoReality?:
o Begin messager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loreality/loreality/model/databases.py

    r2106 r2108  
    9090        self.name = name 
    9191#---------------------------------------------------------------- 
     92class Message(Base): 
     93    __tablename__ = 'messages' 
     94    id = sa.Column(UUID(), primary_key=True,default=uuid.uuid4) 
     95    title = sa.Column(sa.types.String, nullable=False) 
     96    from_ = sa.Column(sa.types.String) 
     97    text = sa.Column(sa.types.String) 
     98    date = sa.Column(sa.types.String) 
     99    pilot_id = sa.Column(UUID(), ForeignKey('pilots.id')) 
     100#---------------------------------------------------------------- 
    92101class Pilot(Base): 
    93102    __tablename__ = 'pilots' 
     
    97106    squadron_id = sa.Column(UUID(), ForeignKey('squadrons.id')) 
    98107 
     108    messages = orm.relation("Message", backref="pilot") 
    99109 
    100110    def __init__( self, name, login ): 
Note: See TracChangeset for help on using the changeset viewer.