# Path: scribeui_pyramid/modules/app/sqla.py
# def get_session(request):
# def init_sqla(settings):
#     def __props__(self, convert_date=False):
#     def __todict__(self):
#         def convert_datetime(value):
#     def __iter__(self):
#     def __json__(self, request):
#     def fromdict(self, values):
#     def all(cls, page=None, limit=None):
#     def by_id(cls, id):
# def includeme(config):
# class BaseMixin(object):


import sqlalchemy as sa
from ..app.sqla import (
    DBSession,
    Base,
    BaseMixin
)
# -*- coding: utf-8 -*-



class Map(Base, BaseMixin):

    __tablename__ = 'maps'
    id = sa.Column(sa.Integer, primary_key=True, autoincrement=True)
    name = sa.Column(sa.Unicode(30), nullable=False)
    type = sa.Column(sa.Unicode(30), nullable=False)
    description = sa.Column(sa.Unicode())
    projection = sa.Column(sa.Unicode())
    extent = sa.Column(sa.Unicode(50))
    git_url = sa.Column(sa.Unicode())

    workspace_id = sa.Column(sa.Integer, sa.ForeignKey('workspaces.id'),
                             nullable=False)

    def __repr__(self):
        return u"<Map('{0}')>".format(self.name)


    @classmethod

# Path: scribeui_pyramid/modules/app/sqla.py
# def get_session(request):
# def init_sqla(settings):
#     def __props__(self, convert_date=False):
#     def __todict__(self):
#         def convert_datetime(value):
#     def __iter__(self):
#     def __json__(self, request):
#     def fromdict(self, values):
#     def all(cls, page=None, limit=None):
#     def by_id(cls, id):
# def includeme(config):
# class BaseMixin(object):


# Path: scribeui_pyramid/modules/maps/models.py
import sqlalchemy as sa
from ..app.sqla import (
    DBSession,
    Base,
    BaseMixin
)

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



class Map(Base, BaseMixin):

    __tablename__ = 'maps'
    id = sa.Column(sa.Integer, primary_key=True, autoincrement=True)
    name = sa.Column(sa.Unicode(30), nullable=False)
    type = sa.Column(sa.Unicode(30), nullable=False)
    description = sa.Column(sa.Unicode())
    projection = sa.Column(sa.Unicode())
    extent = sa.Column(sa.Unicode(50))
    git_url = sa.Column(sa.Unicode())

    workspace_id = sa.Column(sa.Integer, sa.ForeignKey('workspaces.id'),
                             nullable=False)

    def __repr__(self):
        return u"<Map('{0}')>".format(self.name)


    @classmethod

    def by_name(cls, name):