# 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
        read_entry = db_session.query(ReadEntry).filter(ReadEntry.entry_id == entry.id,
                                                        ReadEntry.user_id == user_id).first()
        unread = read_entry is None

        return {
            "entry_id": entry.id,
            "feed_id": entry.feed_id,
            "published": entry.published,
            "updated": entry.updated,
            "title": entry.title,
            "content": entry.content,
            "description": entry.description,
            "link": entry.link,
            "remote_id": entry.remote_id,
            "unread": unread,
        }

    @staticmethod
    def json_list(entries, db_session, user_id):
        """
        Turns a list of entries into JSON ready entries.

        :param entries: The list of entries you want to turn into JSON ready dicts.

        :return: List of JSON ready dicts.
        """

        json_ready = []
        for entry in entries:
            json_ready.append(

# 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

        read_entry = db_session.query(ReadEntry).filter(ReadEntry.entry_id == entry.id,
                                                        ReadEntry.user_id == user_id).first()
        unread = read_entry is None

        return {
            "entry_id": entry.id,
            "feed_id": entry.feed_id,
            "published": entry.published,
            "updated": entry.updated,
            "title": entry.title,
            "content": entry.content,
            "description": entry.description,
            "link": entry.link,
            "remote_id": entry.remote_id,
            "unread": unread,
        }

    @staticmethod
    def json_list(entries, db_session, user_id):
        """
        Turns a list of entries into JSON ready entries.

        :param entries: The list of entries you want to turn into JSON ready dicts.

        :return: List of JSON ready dicts.
        """

        json_ready = []
        for entry in entries:
            json_ready.append(

                Entry.json_entry(entry, db_session, user_id)