2021-03-08 16:49:10 +00:00
|
|
|
""" bring all the models into the app namespace """
|
2020-09-17 20:02:52 +00:00
|
|
|
import inspect
|
|
|
|
import sys
|
|
|
|
|
2020-12-22 18:28:04 +00:00
|
|
|
from .book import Book, Work, Edition, BookDataModel
|
2020-11-27 22:54:08 +00:00
|
|
|
from .author import Author
|
2022-01-09 22:21:13 +00:00
|
|
|
from .link import Link, FileLink, LinkDomain
|
2020-09-17 20:09:11 +00:00
|
|
|
from .connector import Connector
|
2020-11-28 01:20:01 +00:00
|
|
|
|
2020-03-07 06:56:44 +00:00
|
|
|
from .shelf import Shelf, ShelfBook
|
2021-01-31 05:00:36 +00:00
|
|
|
from .list import List, ListItem
|
2020-11-28 01:20:01 +00:00
|
|
|
|
2021-01-01 19:05:49 +00:00
|
|
|
from .status import Status, GeneratedNote, Comment, Quotation
|
|
|
|
from .status import Review, ReviewRating
|
2021-01-01 18:46:15 +00:00
|
|
|
from .status import Boost
|
2020-11-28 01:20:01 +00:00
|
|
|
from .attachment import Image
|
2021-01-01 18:46:15 +00:00
|
|
|
from .favorite import Favorite
|
2021-01-14 03:45:36 +00:00
|
|
|
from .readthrough import ReadThrough, ProgressUpdate, ProgressMode
|
2020-11-28 01:20:01 +00:00
|
|
|
|
2021-01-16 16:18:54 +00:00
|
|
|
from .user import User, KeyPair, AnnualGoal
|
2020-11-28 01:20:01 +00:00
|
|
|
from .relationship import UserFollows, UserFollowRequest, UserBlocks
|
2021-03-09 01:16:59 +00:00
|
|
|
from .report import Report, ReportComment
|
2020-09-17 20:09:11 +00:00
|
|
|
from .federated_server import FederatedServer
|
2020-09-17 20:02:52 +00:00
|
|
|
|
2021-10-02 06:52:34 +00:00
|
|
|
from .group import Group, GroupMember, GroupMemberInvitation
|
2021-09-23 21:49:54 +00:00
|
|
|
|
2020-04-21 14:09:21 +00:00
|
|
|
from .import_job import ImportJob, ImportItem
|
2020-11-28 01:20:01 +00:00
|
|
|
|
2021-09-08 22:08:22 +00:00
|
|
|
from .site import SiteSettings, SiteInvite
|
|
|
|
from .site import PasswordReset, InviteRequest
|
2021-05-19 20:56:00 +00:00
|
|
|
from .announcement import Announcement
|
2022-02-24 20:15:08 +00:00
|
|
|
from .antispam import EmailBlocklist, IPBlocklist, AutoMod, automod_task
|
2020-09-17 20:02:52 +00:00
|
|
|
|
2021-09-22 16:17:14 +00:00
|
|
|
from .notification import Notification
|
|
|
|
|
2020-09-17 20:02:52 +00:00
|
|
|
cls_members = inspect.getmembers(sys.modules[__name__], inspect.isclass)
|
2021-03-08 16:49:10 +00:00
|
|
|
activity_models = {
|
|
|
|
c[1].activity_serializer.__name__: c[1]
|
|
|
|
for c in cls_members
|
|
|
|
if hasattr(c[1], "activity_serializer")
|
|
|
|
}
|
2020-12-30 21:14:16 +00:00
|
|
|
|
|
|
|
status_models = [
|
2021-03-08 16:49:10 +00:00
|
|
|
c.__name__ for (_, c) in activity_models.items() if issubclass(c, Status)
|
|
|
|
]
|