Source code for luna_admin.db.models_admin

"""
Admin database models.
"""
from sqlalchemy import Column, String
from sqlalchemy.ext.declarative import declarative_base

from . import metadata

Base = declarative_base()


[docs]class Admin(Base): """ Admin table """ __tablename__ = "admin" Base.metadata = metadata #: admin login login = Column(String(128), primary_key=True) #: admin password password = Column(String(128)) #: admin email email = Column(String(64), unique=True) def __repr__(self): return "<admin_login %r>" % self.login
[docs]class Account(Base): """ Client table """ __tablename__ = "account" Base.metadata = metadata #: account id account_id = Column(String(36), primary_key=True) #: admin email email = Column(String(64), unique=True) #: str: organization name account represents. organization_name = Column(String(128))