2021-08-28 10:13:50 +00:00
|
|
|
from orm.rbac import Operation, Resource, Permission, Role
|
|
|
|
from orm.community import Community
|
2021-07-13 10:14:48 +00:00
|
|
|
from orm.user import User
|
|
|
|
from orm.message import Message
|
2021-08-20 08:08:32 +00:00
|
|
|
from orm.topic import Topic
|
|
|
|
from orm.notification import Notification
|
2021-09-24 14:39:37 +00:00
|
|
|
from orm.shout import Shout, ShoutAuthor, ShoutTopic, ShoutRating, ShoutViewByDay,\
|
|
|
|
ShoutRatingStorage, ShoutViewStorage
|
|
|
|
from orm.base import Base, engine, local_session
|
2021-10-12 19:38:12 +00:00
|
|
|
from orm.comment import Comment, CommentRating
|
2021-07-13 10:14:48 +00:00
|
|
|
|
2021-10-12 19:38:12 +00:00
|
|
|
__all__ = ["User", "Role", "Operation", "Permission", "Message", "Shout", "Topic", "Notification", "ShoutRating", "Comment", "CommentRating"]
|
2021-07-13 10:14:48 +00:00
|
|
|
|
|
|
|
Base.metadata.create_all(engine)
|
2021-08-17 09:14:26 +00:00
|
|
|
Operation.init_table()
|
|
|
|
Resource.init_table()
|
2021-09-24 14:39:37 +00:00
|
|
|
|
|
|
|
with local_session() as session:
|
2021-09-29 13:37:08 +00:00
|
|
|
ShoutRatingStorage.init(session)
|
2021-09-29 12:59:48 +00:00
|
|
|
ShoutViewStorage.init(session)
|