import db class Magnet(object): pass magnetTable = db.Table( "magnet", db.metadata, db.Column('id', db.Integer, primary_key=True), db.Column('fid', db.Integer), db.Column('magnet_uri', db.TEXT), ) db.mapper(Magnet, magnetTable)
import db class Category(object): pass categoryTable = db.Table( "category", db.metadata, db.Column('id', db.Integer, primary_key=True), db.Column('fid', db.Integer), db.Column('gid', db.Integer), ) db.mapper(Category, categoryTable)
import db class Cast(object): pass castTable = db.Table( "cast", db.metadata, db.Column('id', db.Integer, primary_key=True), db.Column('aid', db.Integer), db.Column('fid', db.Integer), ) db.mapper(Cast, castTable)
import db class Artist(object): pass artistTable = db.Table( "artist", db.metadata, db.Column('aid', db.Integer, primary_key=True), db.Column('artist_name', db.VARCHAR(50), nullable=False), db.Column('stag', db.VARCHAR(40), nullable=True), db.Column('url', db.VARCHAR(100), nullable=True), ) db.mapper(Artist, artistTable)
import db class Genre(object): pass genreTable = db.Table( "genre", db.metadata, db.Column('gid', db.Integer, primary_key=True), db.Column('genre_name', db.VARCHAR(50), nullable=False), db.Column('url', db.VARCHAR(100), nullable=True), ) db.mapper(Genre, genreTable)
import db class Film(object): pass filmTable = db.Table( "film", db.metadata, db.Column('fid', db.Integer, primary_key=True), db.Column('tag', db.VARCHAR(40), nullable=False), db.Column('file_name', db.VARCHAR(1000), nullable=False), db.Column('cover', db.VARCHAR(1000), nullable=True), db.Column('url', db.VARCHAR(200), nullable=True), db.Column('length', db.Integer, nullable=True), db.Column('date', db.VARCHAR(100), nullable=True), db.Column('director', db.VARCHAR(100), nullable=True), db.Column('maker', db.VARCHAR(100), nullable=True), db.Column('producer', db.VARCHAR(100), nullable=True), db.Column('score', db.FLOAT, nullable=True), db.Column('magnet', db.VARCHAR(1000), nullable=True), ) db.mapper(Film, filmTable)
import db class TopArtist(object): pass topArtistTable = db.Table( "topartist", db.metadata, db.Column('aid', db.Integer, primary_key=True), db.Column('artist_name', db.VARCHAR(50), nullable=False), db.Column('stag', db.VARCHAR(40), nullable=True), db.Column('url', db.VARCHAR(100), nullable=True), db.Column('img', db.VARCHAR(100), nullable=True), db.Column('rank', db.Integer, nullable=True), ) db.mapper(TopArtist, topArtistTable)