from django.db import models


class Book(models.Model):
    title = models.CharField(
        max_length=20,
    )
    pages = models.IntegerField(
        default=0,
    )
    description = models.TextField(
        max_length=100,
        default="",
    )
    author = models.CharField(
        max_length=20,
    )

    def __str__(self):
        return f'{self.pk} {self.title} {self.author} {self.description}'