from sqlalchemy import (
    Column,
    String,
    Integer
)
from pyramid_sqlalchemy import BaseObject

# SQLite doesn't support arrays, workaround
from . import ArrayType


class User(BaseObject):
    __tablename__ = 'users'

    id = Column(Integer, primary_key=True)
    username = Column(String(120), unique=True)
    password = Column(String(120))
    first_name = Column(String(120))
    last_name = Column(String(120))
    groups = Column(ArrayType)


sample_users = [
    dict(
        id=1,
        username='jill',
        password='jill1',
        first_name='Jill',
        last_name='Smith',
        groups=['group:editors']
    ),
    dict(
        id=2,
        username='jack',
        password='jack2',
        first_name='Jack',
        last_name='Jones',
        groups=[]
    ),
    dict(
        id=3,
        username='admin',
        password='admin3',
        first_name='Jane',
        last_name='Admin',
        groups=['group:admins', 'group:editors']
    )
]

51687b807f7d249bbe8fa020ad54a758b2bc5f08
<mask token>


class User(BaseObject):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>


<mask token>

<mask token>


class User(BaseObject):
    __tablename__ = 'users'
    id = Column(Integer, primary_key=True)
    username = Column(String(120), unique=True)
    password = Column(String(120))
    first_name = Column(String(120))
    last_name = Column(String(120))
    groups = Column(ArrayType)


<mask token>

<mask token>


class User(BaseObject):
    __tablename__ = 'users'
    id = Column(Integer, primary_key=True)
    username = Column(String(120), unique=True)
    password = Column(String(120))
    first_name = Column(String(120))
    last_name = Column(String(120))
    groups = Column(ArrayType)


sample_users = [dict(id=1, username='jill', password='jill1', first_name=
    'Jill', last_name='Smith', groups=['group:editors']), dict(id=2,
    username='jack', password='jack2', first_name='Jack', last_name='Jones',
    groups=[]), dict(id=3, username='admin', password='admin3', first_name=
    'Jane', last_name='Admin', groups=['group:admins', 'group:editors'])]

from sqlalchemy import Column, String, Integer
from pyramid_sqlalchemy import BaseObject
from . import ArrayType


class User(BaseObject):
    __tablename__ = 'users'
    id = Column(Integer, primary_key=True)
    username = Column(String(120), unique=True)
    password = Column(String(120))
    first_name = Column(String(120))
    last_name = Column(String(120))
    groups = Column(ArrayType)


sample_users = [dict(id=1, username='jill', password='jill1', first_name=
    'Jill', last_name='Smith', groups=['group:editors']), dict(id=2,
    username='jack', password='jack2', first_name='Jack', last_name='Jones',
    groups=[]), dict(id=3, username='admin', password='admin3', first_name=
    'Jane', last_name='Admin', groups=['group:admins', 'group:editors'])]

from sqlalchemy import (
    Column,
    String,
    Integer
)
from pyramid_sqlalchemy import BaseObject

# SQLite doesn't support arrays, workaround
from . import ArrayType


class User(BaseObject):
    __tablename__ = 'users'

    id = Column(Integer, primary_key=True)
    username = Column(String(120), unique=True)
    password = Column(String(120))
    first_name = Column(String(120))
    last_name = Column(String(120))
    groups = Column(ArrayType)


sample_users = [
    dict(
        id=1,
        username='jill',
        password='jill1',
        first_name='Jill',
        last_name='Smith',
        groups=['group:editors']
    ),
    dict(
        id=2,
        username='jack',
        password='jack2',
        first_name='Jack',
        last_name='Jones',
        groups=[]
    ),
    dict(
        id=3,
        username='admin',
        password='admin3',
        first_name='Jane',
        last_name='Admin',
        groups=['group:admins', 'group:editors']
    )
]
