# 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):


from recruit_app.extensions import bcrypt
from recruit_app.database import Column, db, Model, ReferenceCol, relationship, SurrogatePK, TimeMixin
from sqlalchemy.orm import backref
from flask_sqlalchemy import BaseQuery
import datetime
# -*- coding: utf-8 -*-


# import flask_whooshalchemy as whooshalchemy
# from sqlalchemy_searchable import make_searchable
# from sqlalchemy_utils.types import TSVectorType, ScalarListType
#
# from sqlalchemy_searchable import SearchQueryMixin
# from sqlalchemy.dialects import postgresql


# make_searchable()


character_apps = db.Table('app_characters',
        db.Column('app_id', db.Integer(), db.ForeignKey('hr_applications.id')),
        db.Column('character_id', db.String(), db.ForeignKey('characters.character_id')))


class HrApplication(SurrogatePK, TimeMixin, Model):
    # query_class = HrApplicationQuery
    __tablename__ = 'hr_applications'

    __searchable__ = ['thesis',

# 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/recruit/models.py
from recruit_app.extensions import bcrypt
from recruit_app.database import Column, db, Model, ReferenceCol, relationship, SurrogatePK, TimeMixin
from sqlalchemy.orm import backref
from flask_sqlalchemy import BaseQuery
import datetime

# -*- coding: utf-8 -*-


# import flask_whooshalchemy as whooshalchemy
# from sqlalchemy_searchable import make_searchable
# from sqlalchemy_utils.types import TSVectorType, ScalarListType
#
# from sqlalchemy_searchable import SearchQueryMixin
# from sqlalchemy.dialects import postgresql


# make_searchable()


character_apps = db.Table('app_characters',
        db.Column('app_id', db.Integer(), db.ForeignKey('hr_applications.id')),
        db.Column('character_id', db.String(), db.ForeignKey('characters.character_id')))


class HrApplication(SurrogatePK, TimeMixin, Model):
    # query_class = HrApplicationQuery
    __tablename__ = 'hr_applications'

    __searchable__ = ['thesis',

                      'how_long',