Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(44)  |  Call(44)  |  Derive(0)  |  Import(0)

src/o/v/overholt-HEAD/overholt/users/models.py   overholt(Download)
roles_users = db.Table(
    'roles_users',
    db.Column('user_id', db.Integer(), db.ForeignKey('users.id')),
    db.Column('role_id', db.Integer(), db.ForeignKey('roles.id')))
 
 
class Role(RoleMixin, db.Model):
    __tablename__ = 'roles'
 
    id = db.Column(db.Integer(), primary_key=True)
class Role(RoleMixin, db.Model):
    __tablename__ = 'roles'
 
    id = db.Column(db.Integer(), primary_key=True)
    name = db.Column(db.String(80), unique=True)
    description = db.Column(db.String(255))

src/o/v/overholt-HEAD/overholt/stores/models.py   overholt(Download)
stores_products = db.Table(
    'stores_products',
    db.Column('product_id', db.Integer(), db.ForeignKey('products.id')),
    db.Column('store_id', db.Integer(), db.ForeignKey('stores.id')))
 
 
stores_managers = db.Table(
    'stores_managers',
    db.Column('user_id', db.Integer(), db.ForeignKey('users.id')),
    db.Column('store_id', db.Integer(), db.ForeignKey('stores.id')))
class Store(StoreJsonSerializer, db.Model):
    __tablename__ = 'stores'
 
    id = db.Column(db.Integer(), primary_key=True)
    name = db.Column(db.String(255))

src/o/v/overholt-HEAD/overholt/products/models.py   overholt(Download)
products_categories = db.Table(
    'products_categories',
    db.Column('product_id', db.Integer(), db.ForeignKey('products.id')),
    db.Column('category_id', db.Integer(), db.ForeignKey('categories.id')))
 
class Category(CategoryJsonSerializer, db.Model):
    __tablename__ = 'categories'
 
    id = db.Column(db.Integer(), primary_key=True)
    name = db.Column(db.String(255))
    description = db.Column(db.String(255))

src/f/l/Flask-Permissions-0.2.3/flask_permissions/models.py   Flask-Permissions(Download)
user_role_table = db.Table('fp_user_role',
                           db.Column(
                               'user_id', db.Integer, db.ForeignKey('fp_user.id')),
                           db.Column(
                           'role_id', db.Integer, db.ForeignKey('fp_role.id'))
                           )
 
role_ability_table = db.Table('fp_role_ability',
                              db.Column(
                                  'role_id', db.Integer, db.ForeignKey('fp_role.id')),
                                  'role_id', db.Integer, db.ForeignKey('fp_role.id')),
                              db.Column(
                              'ability_id', db.Integer, db.ForeignKey('fp_ability.id'))
                              )
 
    """
    __tablename__ = 'fp_role'
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(120), unique=True)
    abilities = db.relationship(