Added some logic

This commit is contained in:
maciejrusek
2026-03-12 23:24:14 +01:00
parent ca605ac59d
commit 8b55be1b9c
48 changed files with 240 additions and 7 deletions

View File

@@ -0,0 +1,11 @@
from django.db import models
from apps.shelves.models import Shelf
from apps.authors.models import Author
from apps.user.models import User
class Book(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE, related_name="Authors")
authors = models.ManyToManyField(Author, related_name="books")
name = models.CharField(max_length=255)
isbn = models.CharField(max_length=13)