Files
LibraryApp/backend/apps/books/models.py
2026-03-17 20:42:58 +01:00

11 lines
410 B
Python

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)