from sqlalchemy import Column, Integer, String, Float, DateTime

from db import db_session, engine
from db import Base


class Student(Base):
    """
    ユーザモデル
    """
    __tablename__ = 'students'
    id = Column(Integer, primary_key=True)
    user_name = Column(String(128), unique=True)
    hashed_password = Column(String(128))

    def __init__(self, user_name=None, hashed_password=None):
        self.user_name = user_name
        self.hashed_password = hashed_password

    def __repr__(self):
        return '<Name %r>' % (self.user_name)

if __name__ == "__main__":
    Base.metadata.create_all(bind=engine)

#def init_db():
#    Base.metadata.create_all(bind=engine)