Exemplo n.º 1
0
class MovieRecommendation(db.Model):
    __tablename__ = 'movies_recommendations'

    id = db.Column(db.Integer, primary_key=True)
    recommendation_id = db.Column(db.Integer)
    movie_id = db.Column(db.Integer)
    created_at = db.Column(db.DateTime)

    def __init__(self, recommendation_id, movie_id, created_at):
        self.recommendation_id = recommendation_id
        self.movie_id = movie_id
        self.created_at = created_at
Exemplo n.º 2
0
class Ticket(db.Model):
    __tablename__ = 'tickets'

    id = db.Column(db.Integer, primary_key=True)
    user_id = db.Column(db.Integer)
    movie_id = db.Column(db.Integer)
    created_at = db.Column(db.DateTime)
    updated_at = db.Column(db.DateTime)

    def __init__(self, user_id, movie_id, created_at, updated_at):
        self.user_id = user_id
        self.movie_id = movie_id
        self.created_at = created_at
        self.updated_at = updated_at
Exemplo n.º 3
0
class Agent(db.Model):
    __tablename__ = 'agents'

    id = db.Column(db.Integer, primary_key=True)
    agent_name = db.Column(db.String(255))
    access_key = db.Column(db.String(255))
    created_at = db.Column(db.DateTime)

    def __init__(self, agent_name, access_key, created_at):
        self.agent_name = agent_name
        self.access_key = access_key
        self.created_at = created_at

    def __repr__(self):
        return '<Agent %r>' % self.agent_name
Exemplo n.º 4
0
class Recommendation(db.Model):
    __tablename__ = 'recommendations'

    id = db.Column(db.Integer, primary_key=True)
    created_at = db.Column(db.DateTime)
    user_id = db.Column(db.Integer)
    agent_id = db.Column(db.Integer)
    delivered = db.Column(db.Boolean)

    def __init__(self, user_id, agent_id, created_at, delivered=0):
        self.user_id = user_id
        self.agent_id = agent_id
        self.created_at = created_at
        self.delivered = delivered

    def __repr__(self):
        return '<Recommendation %r>' % self.user_id + ' ' + str(self.agent_id)
Exemplo n.º 5
0
class User(db.Model):
    __tablename__ = 'users'

    id = db.Column(db.Integer, primary_key=True)
    created_at = db.Column(db.DateTime)
    updated_at = db.Column(db.DateTime)
    agent_user_id = db.Column(db.Text)
    agent_id = db.Column(db.Integer)
    name = db.Column(db.String(255))
    email = db.Column(db.String(255))
    city = db.Column(db.Text)

    def __init__(self, created_at, updated_at, agent_user_id, agent_id, name,
                 email, city):
        self.created_at = created_at
        self.updated_at = updated_at
        self.agent_user_id = agent_user_id
        self.agent_id = agent_id
        self.name = name
        self.email = email
        self.city = city

    def __repr__(self):
        return '<User>'
Exemplo n.º 6
0
class Vkino(db.Model):
    __tablename__ = 'vkino_movies'
    
    id = db.Column(db.Integer, primary_key = True)
    agent_movie_id = db.Column(db.Integer)
    tmdb_fk_id = db.Column(db.Integer)
    is_actual = db.Column(db.Boolean)
    is_premiere = db.Column(db.Boolean)
    year = db.Column(db.SmallInteger)
    name = db.Column(db.Text)
    nameoriginal = db.Column(db.Text)
    dates = db.Column(db.Text)
    release_date = db.Column(db.DateTime)    
    city = db.Column(db.Text)

    def __init__(self, agent_movie_id, tmdb_fk_id=None, is_actual=0, is_premiere=None, year=None, name=None, nameoriginal=None,dates=None, release_date=None, city=None):
        self.agent_movie_id = agent_movie_id
        self.tmdb_fk_id = tmdb_fk_id
        self.is_actual = is_actual
        self.is_premiere = is_premiere
        self.year = year
        self.name = name
        self.nameoriginal = nameoriginal
        self.dates = dates
        self.release_date = release_date
        self.city = city
Exemplo n.º 7
0
class Movie(db.Model):
    __tablename__ = 'movies'

    id = db.Column(db.Integer, primary_key=True)
    created_at = db.Column(db.DateTime)
    updated_at = db.Column(db.DateTime)
    tmdb_id = db.Column(db.Integer)
    poster_path = db.Column(db.String(255))
    director = db.Column(db.String(255))
    novel = db.Column(db.String(255))
    actors = db.Column(db.String(255))
    budget = db.Column(db.Integer)
    genres = db.Column(db.String(255))
    kwords = db.Column(db.Text)
    runtime = db.Column(db.Integer)
    title = db.Column(db.String(255))

    def __init__(self, created_at, updated_at, tmdb_id, poster_path, \
                 director, novel,actors,budget,genres,kwords,runtime, title):
        self.created_at = created_at
        self.updated_at = updated_at
        self.tmdb_id = tmdb_id
        self.poster_path = poster_path
        self.director = director
        self.novel = novel
        self.actors = actors
        self.novel = novel
        self.actors = actors
        self.budget = budget
        self.genres = genres
        self.kwords = kwords
        self.runtime = runtime
        self.title = title

    def __repr__(self):
        return '<Movie %r>' % self.title