# Path: flask_editablesite/extensions.py

# 
# Path: flask_editablesite/database.py
# class CRUDMixin(object):
# class Model(CRUDMixin, db.Model):
# class SurrogatePK(object):
# class Slugged(object):
# class TimeStamped(object):
# class Confirmable(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=False, pk_name='id', **kwargs):
#     def validate_slug(self, key, value):
# def update_slug_before_save(mapper, connection, target):
#     def created_at_formatted(self):
#     def updated_at_formatted(self):
# def update_timestamps_before_insert(mapper, connection, target):
# def update_timestamps_before_update(mapper, connection, target):
#     def confirmed_at_formatted(self):
# def update_confirmedat_before_save(mapper, connection, target):


from flask import current_app as app
from flask_login import UserMixin
from sqlalchemy import event
from flask_editablesite.extensions import bcrypt
from flask_editablesite.database import (
    Column,
    db,
    Model,
    SurrogatePK,
    TimeStamped,
    Confirmable,
    update_timestamps_before_insert,
    update_timestamps_before_update,
    update_confirmedat_before_save,
)
# -*- coding: utf-8 -*-




class User(UserMixin, SurrogatePK, TimeStamped, Confirmable, Model):
    __tablename__ = 'users'

    email = Column(db.String(255), unique=True, nullable=False)
    password = Column(db.String(255), nullable=True)
    first_name = Column(db.String(255), nullable=True)
    last_name = Column(db.String(255), nullable=True)

    def __init__(self, email, password=None, **kwargs):

# Path: flask_editablesite/extensions.py

# 
# Path: flask_editablesite/database.py
# class CRUDMixin(object):
# class Model(CRUDMixin, db.Model):
# class SurrogatePK(object):
# class Slugged(object):
# class TimeStamped(object):
# class Confirmable(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=False, pk_name='id', **kwargs):
#     def validate_slug(self, key, value):
# def update_slug_before_save(mapper, connection, target):
#     def created_at_formatted(self):
#     def updated_at_formatted(self):
# def update_timestamps_before_insert(mapper, connection, target):
# def update_timestamps_before_update(mapper, connection, target):
#     def confirmed_at_formatted(self):
# def update_confirmedat_before_save(mapper, connection, target):


# Path: flask_editablesite/user/models.py
from flask import current_app as app
from flask_login import UserMixin
from sqlalchemy import event
from flask_editablesite.extensions import bcrypt
from flask_editablesite.database import (
    Column,
    db,
    Model,
    SurrogatePK,
    TimeStamped,
    Confirmable,
    update_timestamps_before_insert,
    update_timestamps_before_update,
    update_confirmedat_before_save,
)

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




class User(UserMixin, SurrogatePK, TimeStamped, Confirmable, Model):
    __tablename__ = 'users'

    email = Column(db.String(255), unique=True, nullable=False)
    password = Column(db.String(255), nullable=True)
    first_name = Column(db.String(255), nullable=True)
    last_name = Column(db.String(255), nullable=True)

    def __init__(self, email, password=None, **kwargs):

        db.Model.__init__(self, email=email, **kwargs)