# Path: pyfeedreader/models/ReadEntries.py
# class ReadEntry(Model):
#     __tablename__ = "read_entry"
#     id = Column('id', Integer, primary_key=True)
#     entry_id = Column(Integer)
#     user_id = Column(Integer, ForeignKey('user.id'))
# 
#     def __init__(self, entry_id, user_id):
#         self.entry_id = entry_id
#         self.user_id = user_id
# 
#     def __repr__(self):
#         return '<ReadEntry %r>' % self.username
# 
# Path: pyfeedreader/database.py
# def init_db():
# def drop_all():


from pyfeedreader.models.ReadEntries import ReadEntry
from pyfeedreader.database import Model, db_session
from sqlalchemy import Column, Integer, String, Text
    updated = Column(Integer)
    title = Column(String(1024))
    content = Column(Text)
    description = Column(String(256))
    link = Column(String(1024))
    remote_id = Column(String(1024))

    def __init__(self, feed_id=None, published=None, updated=None, title=None, content=None, description=None,
                 link=None, remote_id=None, unread=True):
        self.feed_id = feed_id
        self.published = published
        self.updated = updated
        self.title = title
        self.content = content
        self.description = description
        self.link = link
        self.remote_id = remote_id
        self.unread = unread

    @staticmethod
    def json_entry(entry, db_session, user_id):
        """
        Turns the entry object into a JSON ready dict object.

        :param entry: The entry you want to make JSON ready.

        :return: The JSON ready dict.
        """

        read_entry = db_session.query(ReadEntry).filter(ReadEntry.entry_id == entry.id,

# Path: pyfeedreader/models/ReadEntries.py
# class ReadEntry(Model):
#     __tablename__ = "read_entry"
#     id = Column('id', Integer, primary_key=True)
#     entry_id = Column(Integer)
#     user_id = Column(Integer, ForeignKey('user.id'))
# 
#     def __init__(self, entry_id, user_id):
#         self.entry_id = entry_id
#         self.user_id = user_id
# 
#     def __repr__(self):
#         return '<ReadEntry %r>' % self.username
# 
# Path: pyfeedreader/database.py
# def init_db():
# def drop_all():


# Path: pyfeedreader/models/entry.py
from pyfeedreader.models.ReadEntries import ReadEntry
from pyfeedreader.database import Model, db_session
from sqlalchemy import Column, Integer, String, Text

    updated = Column(Integer)
    title = Column(String(1024))
    content = Column(Text)
    description = Column(String(256))
    link = Column(String(1024))
    remote_id = Column(String(1024))

    def __init__(self, feed_id=None, published=None, updated=None, title=None, content=None, description=None,
                 link=None, remote_id=None, unread=True):
        self.feed_id = feed_id
        self.published = published
        self.updated = updated
        self.title = title
        self.content = content
        self.description = description
        self.link = link
        self.remote_id = remote_id
        self.unread = unread

    @staticmethod
    def json_entry(entry, db_session, user_id):
        """
        Turns the entry object into a JSON ready dict object.

        :param entry: The entry you want to make JSON ready.

        :return: The JSON ready dict.
        """

        read_entry = db_session.query(ReadEntry).filter(ReadEntry.entry_id == entry.id,

                                                        ReadEntry.user_id == user_id).first()