# Path: recruit_app/extensions.py

# 
# Path: recruit_app/database.py
# class CRUDMixin(object):
# class Model(CRUDMixin, db.Model):
# class SurrogatePK(object):
# class TimeMixin(object):
#     def create(cls, **kwargs):
#     def update(self, commit=True, **kwargs):
#     def save(self, commit=True):
#     def delete(self, commit=True):
#     def get_by_id(cls, id):
# def ReferenceCol(tablename, nullable=True, pk_name='id', **kwargs):


import datetime as dt
from flask_security import UserMixin, RoleMixin
from flask_security.utils import verify_and_update_password, encrypt_password
from recruit_app.extensions import bcrypt
from recruit_app.database import Column, db, Model, ReferenceCol, relationship, SurrogatePK, TimeMixin
    __tablename__ = 'users'

    email = Column(db.String(80), unique=True, nullable=False)
    #: The hashed password
    password = Column(db.String(128), nullable=True)
    created_at = Column(db.DateTime, nullable=False, default=dt.datetime.utcnow)
    active = Column(db.Boolean(), default=False)
    is_admin = Column(db.Boolean(), default=False)

    confirmed_at = Column(db.DateTime, nullable=True)

    last_login_at = Column(db.DateTime())
    current_login_at = Column(db.DateTime())
    last_login_ip = Column(db.String(100))
    current_login_ip = Column(db.String(100))
    login_count = Column(db.Integer)

    roles = db.relationship('Role', secondary=roles_users, backref=db.backref('users', lazy='dynamic'), lazy='dynamic')

    main_character_id = ReferenceCol('characters', pk_name='character_id', nullable=True)
    main_character = relationship('EveCharacter', backref='user_main_character', foreign_keys=[main_character_id])

    def set_password(self, password):
        self.password = encrypt_password(password)
        self.save()

    def check_password(self, value):
        return verify_and_update_password(value, self)

    @classmethod

# Path: recruit_app/extensions.py

# 
# Path: recruit_app/database.py
# class CRUDMixin(object):
# class Model(CRUDMixin, db.Model):
# class SurrogatePK(object):
# class TimeMixin(object):
#     def create(cls, **kwargs):
#     def update(self, commit=True, **kwargs):
#     def save(self, commit=True):
#     def delete(self, commit=True):
#     def get_by_id(cls, id):
# def ReferenceCol(tablename, nullable=True, pk_name='id', **kwargs):


# Path: recruit_app/user/models.py
import datetime as dt
from flask_security import UserMixin, RoleMixin
from flask_security.utils import verify_and_update_password, encrypt_password
from recruit_app.extensions import bcrypt
from recruit_app.database import Column, db, Model, ReferenceCol, relationship, SurrogatePK, TimeMixin

    __tablename__ = 'users'

    email = Column(db.String(80), unique=True, nullable=False)
    #: The hashed password
    password = Column(db.String(128), nullable=True)
    created_at = Column(db.DateTime, nullable=False, default=dt.datetime.utcnow)
    active = Column(db.Boolean(), default=False)
    is_admin = Column(db.Boolean(), default=False)

    confirmed_at = Column(db.DateTime, nullable=True)

    last_login_at = Column(db.DateTime())
    current_login_at = Column(db.DateTime())
    last_login_ip = Column(db.String(100))
    current_login_ip = Column(db.String(100))
    login_count = Column(db.Integer)

    roles = db.relationship('Role', secondary=roles_users, backref=db.backref('users', lazy='dynamic'), lazy='dynamic')

    main_character_id = ReferenceCol('characters', pk_name='character_id', nullable=True)
    main_character = relationship('EveCharacter', backref='user_main_character', foreign_keys=[main_character_id])

    def set_password(self, password):
        self.password = encrypt_password(password)
        self.save()

    def check_password(self, value):
        return verify_and_update_password(value, self)

    @classmethod

    def create(self, **kwargs):