Changeset 2108 for trunk/loreality/loreality/model/databases.py
- Timestamp:
- 07/06/10 20:14:11 (23 months ago)
- File:
-
- 1 edited
-
trunk/loreality/loreality/model/databases.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/loreality/loreality/model/databases.py
r2106 r2108 90 90 self.name = name 91 91 #---------------------------------------------------------------- 92 class 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 #---------------------------------------------------------------- 92 101 class Pilot(Base): 93 102 __tablename__ = 'pilots' … … 97 106 squadron_id = sa.Column(UUID(), ForeignKey('squadrons.id')) 98 107 108 messages = orm.relation("Message", backref="pilot") 99 109 100 110 def __init__( self, name, login ):
Note: See TracChangeset
for help on using the changeset viewer.
