Добавление зарплаты для ролей, добавление статусов книг, обновление фронтэнда

This commit is contained in:
2025-12-21 00:12:17 +03:00
parent 2bb7d420ec
commit 5096b45243
24 changed files with 1811 additions and 2613 deletions
+5 -3
View File
@@ -6,7 +6,7 @@ from .author import AuthorRead
from .genre import GenreRead
from .book import BookRead
from .loan import LoanRead
from ..enums import BookStatus
class AuthorWithBooks(SQLModel):
"""Модель автора с книгами"""
@@ -35,6 +35,7 @@ class BookWithGenres(SQLModel):
id: int
title: str
description: str
status: BookStatus | None = None
genres: List[GenreRead] = Field(default_factory=list)
@@ -43,6 +44,7 @@ class BookWithAuthorsAndGenres(SQLModel):
id: int
title: str
description: str
status: BookStatus | None = None
authors: List[AuthorRead] = Field(default_factory=list)
genres: List[GenreRead] = Field(default_factory=list)
@@ -55,7 +57,7 @@ class BookFilteredList(SQLModel):
class LoanWithBook(LoanRead):
"""Модель выдачи, включающая данные о книге"""
book: BookRead
class BookStatusUpdate(SQLModel):
"""Модель для ручного изменения статуса библиотекарем"""
status: str
status: str
+1
View File
@@ -8,6 +8,7 @@ class RoleBase(SQLModel):
"""Базовая модель роли"""
name: str
description: str | None = None
payroll: int
class RoleCreate(RoleBase):