"""Collection of Models used in blogsite."""
from . import db


class Post(db.Model):
    """Model representing a blog post.

    Attributes
    ----------
    id : db.Column
        Autogenerated primary key
    title : db.Column
    body : db.Column
    """

    # Columns
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    title = db.Column(db.String(128))
    body = db.Column(db.String(4096))

    def __init__(self, title, body):
        """Constructor for Post.

        Parameters
        ----------
        title : String
            Title/Summary of post
        body : String
            Contents
        """
        self.title = title
        self.body = body

    def __repr__(self):
        """Representation."""
        return '<Post %r:%r>' % self.id, self.title

"""Collection of Models used in blogsite."""
from . import db


class Post(db.Model):
    """Model representing a blog post.

    Attributes
    ----------
    id : SQLAlchemy.Column
        Autogenerated primary key
    title : SQLAlchemy.Column
    body : SQLAlchemy.Column
    """

    # Columns
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    title = db.Column(db.String(128))
    body = db.Column(db.String(4096))

    def __init__(self, title, body):
        """Constructor for Post.

        Parameters
        ----------
        title : String
            Title/Summary of post
        body : String
            Contents
        """
        self.title = title
        self.body = body

    def __repr__(self):
        """Representation."""
        return '<Post %r:%r>' % self.id, self.title

Correct type comment for table columns
Correct type comment for table columns

  """Collection of Models used in blogsite."""
  from . import db
  
  
  class Post(db.Model):
      """Model representing a blog post.
  
      Attributes
      ----------
-     id : db.Column
+     id : SQLAlchemy.Column
          Autogenerated primary key
-     title : db.Column
+     title : SQLAlchemy.Column
-     body : db.Column
+     body : SQLAlchemy.Column
      """
  
      # Columns
      id = db.Column(db.Integer, primary_key=True, autoincrement=True)
      title = db.Column(db.String(128))
      body = db.Column(db.String(4096))
  
      def __init__(self, title, body):
          """Constructor for Post.
  
          Parameters
          ----------
          title : String
              Title/Summary of post
          body : String
              Contents
          """
          self.title = title
          self.body = body
  
      def __repr__(self):
          """Representation."""
          return '<Post %r:%r>' % self.id, self.title
  
Correct type comment for table columns
## Code Before:
"""Collection of Models used in blogsite."""
from . import db


class Post(db.Model):
    """Model representing a blog post.

    Attributes
    ----------
    id : db.Column
        Autogenerated primary key
    title : db.Column
    body : db.Column
    """

    # Columns
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    title = db.Column(db.String(128))
    body = db.Column(db.String(4096))

    def __init__(self, title, body):
        """Constructor for Post.

        Parameters
        ----------
        title : String
            Title/Summary of post
        body : String
            Contents
        """
        self.title = title
        self.body = body

    def __repr__(self):
        """Representation."""
        return '<Post %r:%r>' % self.id, self.title

## Instruction:
Correct type comment for table columns
## Code After:
"""Collection of Models used in blogsite."""
from . import db


class Post(db.Model):
    """Model representing a blog post.

    Attributes
    ----------
    id : SQLAlchemy.Column
        Autogenerated primary key
    title : SQLAlchemy.Column
    body : SQLAlchemy.Column
    """

    # Columns
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    title = db.Column(db.String(128))
    body = db.Column(db.String(4096))

    def __init__(self, title, body):
        """Constructor for Post.

        Parameters
        ----------
        title : String
            Title/Summary of post
        body : String
            Contents
        """
        self.title = title
        self.body = body

    def __repr__(self):
        """Representation."""
        return '<Post %r:%r>' % self.id, self.title
