duck-booking-tool/models.py

22 lines
630 B
Python
Raw Normal View History

2016-10-28 09:51:06 +00:00
import sqlalchemy as sa
import sqlalchemy.orm as orm
2016-10-28 03:26:16 +00:00
from sqlalchemy.ext.declarative import declarative_base
2016-10-28 09:51:06 +00:00
#from flask.ext.login import UserMixin
#from sqlalchemy_login_models.model import Base, UserKey, User as SLM_User
__all__ = ['Duck']
2016-10-28 03:26:16 +00:00
Base = declarative_base()
class Duck( Base ):
2016-10-28 09:51:06 +00:00
__tablename__ = 'duck'
__name__ = "duck"
2016-10-28 03:26:16 +00:00
2016-10-28 09:51:06 +00:00
duck_id = sa.Column( sa.Integer, primary_key=True )
name = sa.Column( sa.String )
color = sa.Column( sa.String )
2016-10-28 03:26:16 +00:00
def __repr__(self):
return "<User(name='%s', fullname='%s', password='%s')>" % (
self.name, self.fullname, self.password)