working-on
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
from orm.rbac import Operation, Resource, Permission, Role
|
||||
from storages.roles import RoleStorage
|
||||
from services.auth.roles import RoleStorage
|
||||
from orm.community import Community
|
||||
from orm.user import User, UserRating
|
||||
from orm.topic import Topic, TopicFollower
|
||||
from orm.notification import Notification
|
||||
from orm.shout import Shout
|
||||
from orm.reaction import Reaction
|
||||
from storages.topics import TopicStorage
|
||||
from storages.users import UserStorage
|
||||
from storages.viewed import ViewedStorage
|
||||
from services.zine.topics import TopicStorage
|
||||
from services.auth.users import UserStorage
|
||||
from services.stat.viewed import ViewedStorage
|
||||
from base.orm import Base, engine, local_session
|
||||
|
||||
__all__ = ["User", "Role", "Operation", "Permission", \
|
||||
|
20
orm/collection.py
Normal file
20
orm/collection.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from datetime import datetime
|
||||
from sqlalchemy import Column, String, ForeignKey, DateTime, JSON as JSONType
|
||||
from base.orm import Base
|
||||
|
||||
class ShoutCollection(Base):
|
||||
__tablename__ = 'shout_collection'
|
||||
|
||||
id = None
|
||||
shout = Column(ForeignKey('shout.slug'), primary_key = True)
|
||||
collection = Column(ForeignKey('collection.slug'), primary_key = True)
|
||||
|
||||
class Collection(Base):
|
||||
__tablename__ = 'collection'
|
||||
|
||||
id = None
|
||||
slug: str = Column(String, primary_key = True)
|
||||
title: str = Column(String, nullable=False, comment="Title")
|
||||
body: str = Column(String, nullable=True, comment="Body")
|
||||
pic: str = Column(String, nullable=True, comment="Picture")
|
||||
|
@@ -3,7 +3,7 @@ from sqlalchemy import Column, String, ForeignKey, DateTime
|
||||
from base.orm import Base, local_session
|
||||
import enum
|
||||
from sqlalchemy import Enum
|
||||
from storages.viewed import ViewedStorage
|
||||
from services.stat.viewed import ViewedStorage
|
||||
|
||||
class ReactionKind(enum.Enum):
|
||||
AGREE = 1 # +1
|
||||
|
@@ -4,8 +4,8 @@ from sqlalchemy.orm import relationship
|
||||
from orm.user import User
|
||||
from orm.topic import Topic, ShoutTopic
|
||||
from orm.reaction import Reaction
|
||||
from storages.reactions import ReactionsStorage
|
||||
from storages.viewed import ViewedStorage
|
||||
from services.zine.reactions import ReactionsStorage
|
||||
from services.stat.viewed import ViewedStorage
|
||||
from base.orm import Base
|
||||
|
||||
|
||||
|
@@ -3,7 +3,7 @@ from sqlalchemy import Column, Integer, String, ForeignKey, Boolean, DateTime, J
|
||||
from sqlalchemy.orm import relationship
|
||||
from base.orm import Base, local_session
|
||||
from orm.rbac import Role
|
||||
from storages.roles import RoleStorage
|
||||
from services.auth.roles import RoleStorage
|
||||
|
||||
class UserNotifications(Base):
|
||||
__tablename__ = 'user_notifications'
|
||||
|
Reference in New Issue
Block a user