~homeworkprod/byceps

48ce2c6c3234aafe1e8f07f7ad48d8746e7c62ca — Jochen Kupperschmidt 9 months ago cbab5a7
Clarify names of packages, modules with database models
207 files changed, 402 insertions(+), 400 deletions(-)

M app.py
M byceps/blueprints/admin/shop/order/service.py
M byceps/blueprints/admin/ticketing/service.py
M byceps/blueprints/admin/user/service.py
M byceps/blueprints/api/v1/user_avatar/views.py
M byceps/blueprints/common/authentication/password/views.py
M byceps/blueprints/site/board/service.py
M byceps/blueprints/site/dashboard/views.py
M byceps/blueprints/site/seating/service.py
M byceps/blueprints/site/seating/views.py
M byceps/blueprints/site/ticketing/notification_service.py
M byceps/services/attendance/service.py
M byceps/services/attendance/transfer/models.py
R byceps/services/authentication/password/{models.py => dbmodels.py}
M byceps/services/authentication/password/reset_service.py
M byceps/services/authentication/password/service.py
M byceps/services/authentication/service.py
R byceps/services/{brand/models/__init__.py => authentication/session/dbmodels/__init__.py}
R byceps/services/authentication/session/{models/recent_login.py => dbmodels/recent_login.py}
R byceps/services/authentication/session/{models/session_token.py => dbmodels/session_token.py}
M byceps/services/authentication/session/service.py
R byceps/services/authorization/{models.py => dbmodels.py}
M byceps/services/authorization/impex_service.py
M byceps/services/authorization/service.py
M byceps/services/board/access_control_service.py
M byceps/services/board/aggregation_service.py
M byceps/services/board/board_service.py
M byceps/services/board/category_command_service.py
M byceps/services/board/category_query_service.py
R byceps/services/board/{models/__init__.py => dbmodels/__init__.py}
R byceps/services/board/{models/board.py => dbmodels/board.py}
R byceps/services/board/{models/board_access_grant.py => dbmodels/board_access_grant.py}
R byceps/services/board/{models/category.py => dbmodels/category.py}
R byceps/services/board/{models/last_category_view.py => dbmodels/last_category_view.py}
R byceps/services/board/{models/last_topic_view.py => dbmodels/last_topic_view.py}
R byceps/services/board/{models/posting.py => dbmodels/posting.py}
R byceps/services/board/{models/topic.py => dbmodels/topic.py}
M byceps/services/board/last_view_service.py
M byceps/services/board/posting_command_service.py
M byceps/services/board/posting_query_service.py
M byceps/services/board/topic_command_service.py
M byceps/services/board/topic_query_service.py
R byceps/services/{consent/models/__init__.py => brand/dbmodels/__init__.py}
R byceps/services/brand/{models/brand.py => dbmodels/brand.py}
R byceps/services/brand/{models/setting.py => dbmodels/setting.py}
M byceps/services/brand/service.py
M byceps/services/brand/settings_service.py
M byceps/services/consent/consent_service.py
R byceps/services/{news/models/__init__.py => consent/dbmodels/__init__.py}
R byceps/services/consent/{models/brand_requirement.py => dbmodels/brand_requirement.py}
R byceps/services/consent/{models/consent.py => dbmodels/consent.py}
R byceps/services/consent/{models/subject.py => dbmodels/subject.py}
M byceps/services/consent/subject_service.py
R byceps/services/email/{models.py => dbmodels.py}
M byceps/services/email/service.py
R byceps/services/global_setting/{models.py => dbmodels.py}
M byceps/services/global_setting/service.py
M byceps/services/news/channel_service.py
R byceps/services/{party/models/__init__.py => news/dbmodels/__init__.py}
R byceps/services/news/{models/channel.py => dbmodels/channel.py}
R byceps/services/news/{models/image.py => dbmodels/image.py}
R byceps/services/news/{models/item.py => dbmodels/item.py}
M byceps/services/news/image_service.py
M byceps/services/news/service.py
M byceps/services/newsletter/command_service.py
R byceps/services/newsletter/{models.py => dbmodels.py}
M byceps/services/newsletter/service.py
M byceps/services/orga/birthday_service.py
R byceps/services/orga/{models.py => dbmodels.py}
M byceps/services/orga/service.py
R byceps/services/orga_presence/{models.py => dbmodels.py}
M byceps/services/orga_presence/service.py
R byceps/services/orga_team/{models.py => dbmodels.py}
M byceps/services/orga_team/service.py
R byceps/services/{seating/models/__init__.py => party/dbmodels/__init__.py}
R byceps/services/party/{models/party.py => dbmodels/party.py}
R byceps/services/party/{models/setting.py => dbmodels/setting.py}
M byceps/services/party/service.py
M byceps/services/party/settings_service.py
M byceps/services/seating/area_service.py
R byceps/services/{site/models/__init__.py => seating/dbmodels/__init__.py}
R byceps/services/seating/{models/area.py => dbmodels/area.py}
R byceps/services/seating/{models/seat.py => dbmodels/seat.py}
R byceps/services/seating/{models/seat_group.py => dbmodels/seat_group.py}
M byceps/services/seating/seat_group_service.py
M byceps/services/seating/seat_service.py
R byceps/services/{snippet/models/__init__.py => shop/article/dbmodels/__init__.py}
R byceps/services/shop/article/{models/article.py => dbmodels/article.py}
R byceps/services/shop/article/{models/attached_article.py => dbmodels/attached_article.py}
R byceps/services/shop/article/{models/number_sequence.py => dbmodels/number_sequence.py}
M byceps/services/shop/article/sequence_service.py
M byceps/services/shop/article/service.py
M byceps/services/shop/cart/models.py
R byceps/services/shop/catalog/{models.py => dbmodels.py}
M byceps/services/shop/catalog/service.py
M byceps/services/shop/order/action_registry_service.py
M byceps/services/shop/order/action_service.py
M byceps/services/shop/order/actions/award_badge.py
M byceps/services/shop/order/actions/create_ticket_bundles.py
M byceps/services/shop/order/actions/create_tickets.py
M byceps/services/shop/order/actions/revoke_ticket_bundles.py
M byceps/services/shop/order/actions/revoke_tickets.py
R byceps/services/{terms/models/__init__.py => shop/order/dbmodels/__init__.py}
R byceps/services/shop/order/{models/number_sequence.py => dbmodels/number_sequence.py}
R byceps/services/shop/order/{models/order.py => dbmodels/order.py}
R byceps/services/shop/order/{models/order_action.py => dbmodels/order_action.py}
R byceps/services/shop/order/{models/order_event.py => dbmodels/order_event.py}
R byceps/services/shop/order/{models/order_item.py => dbmodels/order_item.py}
M byceps/services/shop/order/event_service.py
M byceps/services/shop/order/ordered_articles_service.py
M byceps/services/shop/order/sequence_service.py
M byceps/services/shop/order/service.py
M byceps/services/shop/shipping/service.py
R byceps/services/shop/shop/{models.py => dbmodels.py}
M byceps/services/shop/shop/service.py
R byceps/services/shop/storefront/{models.py => dbmodels.py}
M byceps/services/shop/storefront/service.py
R byceps/services/{ticketing/models/__init__.py => site/dbmodels/__init__.py}
R byceps/services/site/{models/setting.py => dbmodels/setting.py}
R byceps/services/site/{models/site.py => dbmodels/site.py}
M byceps/services/site/service.py
M byceps/services/site/settings_service.py
R byceps/services/{tourney/models/__init__.py => snippet/dbmodels/__init__.py}
R byceps/services/snippet/{models/mountpoint.py => dbmodels/mountpoint.py}
R byceps/services/snippet/{models/snippet.py => dbmodels/snippet.py}
M byceps/services/snippet/mountpoint_service.py
M byceps/services/snippet/service.py
M byceps/services/terms/consent_service.py
R byceps/services/{user/models/__init__.py => terms/dbmodels/__init__.py}
R byceps/services/terms/{models/document.py => dbmodels/document.py}
R byceps/services/terms/{models/version.py => dbmodels/version.py}
M byceps/services/terms/document_service.py
M byceps/services/terms/version_service.py
M byceps/services/ticketing/attendance_service.py
M byceps/services/ticketing/category_service.py
R byceps/services/{user_badge/models/__init__.py => ticketing/dbmodels/__init__.py}
R byceps/services/ticketing/{models/archived_attendance.py => dbmodels/archived_attendance.py}
R byceps/services/ticketing/{models/category.py => dbmodels/category.py}
R byceps/services/ticketing/{models/ticket.py => dbmodels/ticket.py}
R byceps/services/ticketing/{models/ticket_bundle.py => dbmodels/ticket_bundle.py}
R byceps/services/ticketing/{models/ticket_event.py => dbmodels/ticket_event.py}
M byceps/services/ticketing/event_service.py
M byceps/services/ticketing/ticket_bundle_service.py
M byceps/services/ticketing/ticket_creation_service.py
M byceps/services/ticketing/ticket_seat_management_service.py
M byceps/services/ticketing/ticket_service.py
M byceps/services/ticketing/ticket_user_checkin_service.py
R byceps/services/tourney/avatar/{models.py => dbmodels.py}
M byceps/services/tourney/avatar/service.py
M byceps/services/tourney/category_service.py
A byceps/services/tourney/dbmodels/__init__.py
R byceps/services/tourney/{models/match.py => dbmodels/match.py}
R byceps/services/tourney/{models/match_comment.py => dbmodels/match_comment.py}
R byceps/services/tourney/{models/participant.py => dbmodels/participant.py}
R byceps/services/tourney/{models/tourney.py => dbmodels/tourney.py}
R byceps/services/tourney/{models/tourney_category.py => dbmodels/tourney_category.py}
M byceps/services/tourney/match_comment_service.py
M byceps/services/tourney/match_service.py
M byceps/services/tourney/participant_service.py
M byceps/services/tourney/tourney_service.py
M byceps/services/user/command_service.py
M byceps/services/user/creation_service.py
A byceps/services/user/dbmodels/__init__.py
R byceps/services/user/{models/detail.py => dbmodels/detail.py}
R byceps/services/user/{models/event.py => dbmodels/event.py}
R byceps/services/user/{models/user.py => dbmodels/user.py}
M byceps/services/user/deletion_service.py
M byceps/services/user/email_address_verification_service.py
M byceps/services/user/event_service.py
M byceps/services/user/service.py
M byceps/services/user/stats_service.py
R byceps/services/user_avatar/{models.py => dbmodels.py}
M byceps/services/user_avatar/service.py
M byceps/services/user_badge/awarding_service.py
M byceps/services/user_badge/badge_service.py
A byceps/services/user_badge/dbmodels/__init__.py
R byceps/services/user_badge/{models/awarding.py => dbmodels/awarding.py}
R byceps/services/user_badge/{models/badge.py => dbmodels/badge.py}
R byceps/services/user_group/{models.py => dbmodels.py}
M byceps/services/user_group/service.py
R byceps/services/verification_token/{models.py => dbmodels.py}
M byceps/services/verification_token/service.py
R byceps/services/webhooks/{models.py => dbmodels.py}
M byceps/services/webhooks/service.py
M scripts/_validators.py
M scripts/clean_up_after_deleted_users.py
M scripts/find_logins_for_ipaddress.py
M scripts/set_current_terms_version.py
M tests/helpers.py
M tests/integration/api/v1/tourney/match/comments/test_create.py
M tests/integration/blueprints/admin/newsletter/test_views.py
M tests/integration/blueprints/admin/shop/order/test_views.py
M tests/integration/blueprints/common/authentication/password/test_views_password_update.py
M tests/integration/blueprints/site/shop/order/test_views.py
M tests/integration/blueprints/site/user/test_views_create.py
M tests/integration/services/authentication/test_update_password_hash.py
M tests/integration/services/shop/order/test_ordered_articles_service.py
M tests/integration/services/ticketing/test_revocation.py
M tests/integration/services/ticketing/test_seat_management_service.py
M tests/integration/services/user/test_detail_extras.py
M tests/integration/services/user_avatar/test_models_image_path.py
M tests/integration/services/user_badge/test_service_awarding.py
M tests/unit/services/shop/order/test_order_payment_state.py
M tests/unit/services/ticketing/test_models.py
M tests/unit/services/user/test_models_full_name.py
M tests/unit/services/user_avatar/test_models.py
M tests/unit/services/verification_token/test_models.py
M app.py => app.py +7 -7
@@ 9,17 9,17 @@ application instance
from byceps.application import create_app, init_app
from byceps import config
from byceps.database import db
from byceps.services.brand.models.brand import Brand
from byceps.services.party.models.party import Party
from byceps.services.shop.article.models.article import Article
from byceps.services.shop.order.models.order import Order
from byceps.services.shop.order.models.order_item import OrderItem
from byceps.services.brand.dbmodels.brand import Brand
from byceps.services.party.dbmodels.party import Party
from byceps.services.shop.article.dbmodels.article import Article
from byceps.services.shop.order.dbmodels.order import Order
from byceps.services.shop.order.dbmodels.order_item import OrderItem
from byceps.services.shop.order.service import find_order_by_order_number
from byceps.services.shop.order.transfer.models import \
    PaymentState as OrderPaymentState
from byceps.services.ticketing.ticket_service import find_ticket_by_code
from byceps.services.user.models.detail import UserDetail
from byceps.services.user.models.user import User
from byceps.services.user.dbmodels.detail import UserDetail
from byceps.services.user.dbmodels.user import User
from byceps.services.user.service import find_user_by_screen_name
from byceps.util.system import get_config_filename_from_env_or_exit


M byceps/blueprints/admin/shop/order/service.py => byceps/blueprints/admin/shop/order/service.py +2 -2
@@ 12,7 12,7 @@ from typing import Dict, Iterator, Sequence

from .....services.shop.article import service as article_service
from .....services.shop.article.transfer.models import Article, ArticleNumber
from .....services.shop.order.models.order_event import (
from .....services.shop.order.dbmodels.order_event import (
    OrderEvent,
    OrderEventData,
)


@@ 20,7 20,7 @@ from .....services.shop.order import event_service as order_event_service
from .....services.shop.order import service as order_service
from .....services.shop.order.transfer.models import Order, OrderID
from .....services.ticketing import category_service as ticket_category_service
from .....services.user.models.user import User as DbUser
from .....services.user.dbmodels.user import User as DbUser
from .....services.user import service as user_service
from .....services.user.transfer.models import User
from .....services.user_badge import badge_service as user_badge_service

M byceps/blueprints/admin/ticketing/service.py => byceps/blueprints/admin/ticketing/service.py +1 -1
@@ 10,7 10,7 @@ from typing import Any, Dict, Iterator, Optional, Sequence, Set, Tuple

from ....services.seating import seat_service
from ....services.ticketing import event_service
from ....services.ticketing.models.ticket_event import (
from ....services.ticketing.dbmodels.ticket_event import (
    TicketEvent,
    TicketEventData,
)

M byceps/blueprints/admin/user/service.py => byceps/blueprints/admin/user/service.py +4 -4
@@ 20,15 20,15 @@ from ....services.party import service as party_service
from ....services.party.transfer.models import Party
from ....services.shop.order import service as order_service
from ....services.site import service as site_service
from ....services.ticketing.models.ticket import Ticket as DbTicket
from ....services.ticketing.dbmodels.ticket import Ticket as DbTicket
from ....services.ticketing import attendance_service, ticket_service
from ....services.user import event_service
from ....services.user.models.detail import UserDetail as DbUserDetail
from ....services.user.models.event import (
from ....services.user.dbmodels.detail import UserDetail as DbUserDetail
from ....services.user.dbmodels.event import (
    UserEvent as DbUserEvent,
    UserEventData,
)
from ....services.user.models.user import User as DbUser
from ....services.user.dbmodels.user import User as DbUser
from ....services.user import service as user_service
from ....services.user.transfer.models import User
from ....services.user_avatar import service as avatar_service

M byceps/blueprints/api/v1/user_avatar/views.py => byceps/blueprints/api/v1/user_avatar/views.py +1 -1
@@ 9,7 9,7 @@ byceps.blueprints.api.v1.user_avatar.views
from flask import redirect

from .....services.user_avatar import service as user_avatar_service
from .....services.user_avatar.models import FALLBACK_AVATAR_URL_PATH
from .....services.user_avatar.dbmodels import FALLBACK_AVATAR_URL_PATH
from .....util.framework.blueprint import create_blueprint



M byceps/blueprints/common/authentication/password/views.py => byceps/blueprints/common/authentication/password/views.py +1 -1
@@ 23,7 23,7 @@ from .....services.user import service as user_service
from .....services.verification_token import (
    service as verification_token_service,
)
from .....services.verification_token.models import Token as VerificationToken
from .....services.verification_token.dbmodels import Token as VerificationToken
from .....util.framework.blueprint import create_blueprint
from .....util.framework.flash import flash_error, flash_success
from .....util.framework.templating import templated

M byceps/blueprints/site/board/service.py => byceps/blueprints/site/board/service.py +2 -2
@@ 12,8 12,8 @@ from typing import Dict, Optional, Sequence, Set
from flask import g

from ....services.authentication.session.models.current_user import CurrentUser
from ....services.board.models.topic import Topic as DbTopic
from ....services.board.models.posting import Posting as DbPosting
from ....services.board.dbmodels.topic import Topic as DbTopic
from ....services.board.dbmodels.posting import Posting as DbPosting
from ....services.board import (
    last_view_service as board_last_view_service,
    posting_query_service as board_posting_query_service,

M byceps/blueprints/site/dashboard/views.py => byceps/blueprints/site/dashboard/views.py +2 -2
@@ 13,7 13,7 @@ from typing import List
from flask import abort, g

from ....services.authentication.session.models.current_user import CurrentUser
from ....services.board.models.topic import Topic as DbTopic
from ....services.board.dbmodels.topic import Topic as DbTopic
from ....services.board import (
    access_control_service as board_access_control_service,
    topic_query_service as board_topic_query_service,


@@ 26,7 26,7 @@ from ....services.shop.storefront import service as storefront_service
from ....services.site import service as site_service
from ....services.site.transfer.models import Site
from ....services.ticketing import ticket_service
from ....services.ticketing.models.ticket import Ticket as DbTicket
from ....services.ticketing.dbmodels.ticket import Ticket as DbTicket
from ....services.user import service as user_service
from ....typing import UserID
from ....util.framework.blueprint import create_blueprint

M byceps/blueprints/site/seating/service.py => byceps/blueprints/site/seating/service.py +2 -2
@@ 10,9 10,9 @@ from dataclasses import dataclass
from itertools import chain
from typing import Dict, Iterator, Optional, Sequence

from ....services.seating.models.seat import Seat as DbSeat
from ....services.seating.dbmodels.seat import Seat as DbSeat
from ....services.seating.transfer.models import SeatID
from ....services.ticketing.models.ticket import Ticket as DbTicket
from ....services.ticketing.dbmodels.ticket import Ticket as DbTicket
from ....services.ticketing.transfer.models import (
    TicketCategoryID,
    TicketCode,

M byceps/blueprints/site/seating/views.py => byceps/blueprints/site/seating/views.py +2 -2
@@ 11,10 11,10 @@ from flask_babel import gettext

from ....services.party import service as party_service
from ....services.seating import area_service as seating_area_service
from ....services.seating.models.seat import Seat
from ....services.seating.dbmodels.seat import Seat
from ....services.seating import seat_service
from ....services.seating.transfer.models import SeatID
from ....services.ticketing.models.ticket import Ticket as DbTicket
from ....services.ticketing.dbmodels.ticket import Ticket as DbTicket
from ....services.ticketing import (
    exceptions as ticket_exceptions,
    ticket_seat_management_service,

M byceps/blueprints/site/ticketing/notification_service.py => byceps/blueprints/site/ticketing/notification_service.py +1 -1
@@ 11,7 11,7 @@ from flask import g
from ....services.email import service as email_service
from ....services.party import service as party_service
from ....services.site import service as site_service
from ....services.ticketing.models.ticket import Ticket
from ....services.ticketing.dbmodels.ticket import Ticket
from ....services.user import service as user_service
from ....services.user.transfer.models import User


M byceps/services/attendance/service.py => byceps/services/attendance/service.py +2 -2
@@ 12,8 12,8 @@ from typing import Dict, Iterable, List, Optional, Set, Tuple
from ...database import db, paginate, Pagination
from ...typing import PartyID, UserID

from ..ticketing.models.ticket import Category as DbCategory, Ticket as DbTicket
from ..user.models.user import User as DbUser
from ..ticketing.dbmodels.ticket import Category as DbCategory, Ticket as DbTicket
from ..user.dbmodels.user import User as DbUser

from .transfer.models import Attendee, AttendeeTicket


M byceps/services/attendance/transfer/models.py => byceps/services/attendance/transfer/models.py +2 -2
@@ 9,8 9,8 @@ byceps.services.attendance.transfer.models
from dataclasses import dataclass
from typing import List, Optional

from ....services.seating.models.seat import Seat
from ....services.user.models.user import User
from ....services.seating.dbmodels.seat import Seat
from ....services.user.dbmodels.user import User


@dataclass  # Not yet frozen b/c models are not immutable.

R byceps/services/authentication/password/models.py => byceps/services/authentication/password/dbmodels.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.authentication.password.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.authentication.password.dbmodels
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

M byceps/services/authentication/password/reset_service.py => byceps/services/authentication/password/reset_service.py +2 -2
@@ 10,9 10,9 @@ from typing import Optional

from ...email import service as email_service
from ...email.transfer.models import Sender
from ...user.models.user import User
from ...user.dbmodels.user import User
from ...user import service as user_service
from ...verification_token.models import Token
from ...verification_token.dbmodels import Token
from ...verification_token import service as verification_token_service

from . import service as password_service

M byceps/services/authentication/password/service.py => byceps/services/authentication/password/service.py +1 -1
@@ 20,7 20,7 @@ from ...user import event_service as user_event_service

from ..session import service as session_service

from .models import Credential as DbCredential
from .dbmodels import Credential as DbCredential


PASSWORD_HASH_ITERATIONS = 250000

M byceps/services/authentication/service.py => byceps/services/authentication/service.py +1 -1
@@ 8,7 8,7 @@ byceps.services.authentication.service

from typing import Optional

from ..user.models.user import User as DbUser
from ..user.dbmodels.user import User as DbUser
from ..user import service as user_service
from ..user.transfer.models import User


R byceps/services/brand/models/__init__.py => byceps/services/authentication/session/dbmodels/__init__.py +0 -0
R byceps/services/authentication/session/models/recent_login.py => byceps/services/authentication/session/dbmodels/recent_login.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.authentication.session.models.recent_login
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.authentication.session.dbmodels.recent_login
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/authentication/session/models/session_token.py => byceps/services/authentication/session/dbmodels/session_token.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.authentication.session.models.session_token
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.authentication.session.dbmodels.session_token
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

M byceps/services/authentication/session/service.py => byceps/services/authentication/session/service.py +2 -2
@@ 21,9 21,9 @@ from ...user.transfer.models import User

from ..exceptions import AuthenticationFailed

from .dbmodels.recent_login import RecentLogin as DbRecentLogin
from .dbmodels.session_token import SessionToken as DbSessionToken
from .models.current_user import CurrentUser
from .models.recent_login import RecentLogin as DbRecentLogin
from .models.session_token import SessionToken as DbSessionToken


def get_session_token(user_id: UserID) -> DbSessionToken:

R byceps/services/authorization/models.py => byceps/services/authorization/dbmodels.py +3 -3
@@ 1,6 1,6 @@
"""
byceps.services.authorization.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.authorization.dbmodels
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 12,7 12,7 @@ from ...database import db
from ...typing import UserID
from ...util.instances import ReprBuilder

from ..user.models.user import User
from ..user.dbmodels.user import User

from .transfer.models import PermissionID, RoleID


M byceps/services/authorization/impex_service.py => byceps/services/authorization/impex_service.py +1 -1
@@ 15,7 15,7 @@ import rtoml

from ...database import db

from .models import Permission as DbPermission, Role as DbRole
from .dbmodels import Permission as DbPermission, Role as DbRole
from . import service



M byceps/services/authorization/service.py => byceps/services/authorization/service.py +1 -1
@@ 15,7 15,7 @@ from ...typing import UserID

from ..user import event_service as user_event_service

from .models import (
from .dbmodels import (
    Permission as DbPermission,
    Role as DbRole,
    RolePermission as DbRolePermission,

M byceps/services/board/access_control_service.py => byceps/services/board/access_control_service.py +2 -2
@@ 9,8 9,8 @@ byceps.services.board.access_control_service
from ...database import db
from ...typing import UserID

from .models.board import Board
from .models.board_access_grant import BoardAccessGrant, BoardAccessGrantID
from .dbmodels.board import Board
from .dbmodels.board_access_grant import BoardAccessGrant, BoardAccessGrantID
from .transfer.models import BoardID



M byceps/services/board/aggregation_service.py => byceps/services/board/aggregation_service.py +3 -3
@@ 8,9 8,9 @@ byceps.services.board.aggregation_service

from ...database import db

from .models.category import Category as DbCategory
from .models.posting import Posting as DbPosting
from .models.topic import Topic as DbTopic
from .dbmodels.category import Category as DbCategory
from .dbmodels.posting import Posting as DbPosting
from .dbmodels.topic import Topic as DbTopic


def aggregate_category(category: DbCategory) -> None:

M byceps/services/board/board_service.py => byceps/services/board/board_service.py +1 -1
@@ 13,7 13,7 @@ from ...typing import BrandID

from ..brand import service as brand_service

from .models.board import Board as DbBoard
from .dbmodels.board import Board as DbBoard
from .transfer.models import Board, BoardID



M byceps/services/board/category_command_service.py => byceps/services/board/category_command_service.py +2 -2
@@ 8,8 8,8 @@ byceps.services.board.category_command_service

from ...database import db

from .models.board import Board as DbBoard
from .models.category import Category as DbCategory
from .dbmodels.board import Board as DbBoard
from .dbmodels.category import Category as DbCategory
from .transfer.models import BoardID, Category, CategoryID
from . import topic_query_service


M byceps/services/board/category_query_service.py => byceps/services/board/category_query_service.py +1 -1
@@ 10,7 10,7 @@ from typing import Optional, Sequence

from ...database import db

from .models.category import Category as DbCategory
from .dbmodels.category import Category as DbCategory
from .transfer.models import (
    BoardID,
    Category,

R byceps/services/board/models/__init__.py => byceps/services/board/dbmodels/__init__.py +0 -0
R byceps/services/board/models/board.py => byceps/services/board/dbmodels/board.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.board.models.board
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.board.dbmodels.board
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/board/models/board_access_grant.py => byceps/services/board/dbmodels/board_access_grant.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.board.models.board_access_grant
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.board.dbmodels.board_access_grant
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/board/models/category.py => byceps/services/board/dbmodels/category.py +3 -3
@@ 1,6 1,6 @@
"""
byceps.services.board.models.category
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.board.dbmodels.category
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 11,7 11,7 @@ from sqlalchemy.ext.orderinglist import ordering_list
from ....database import BaseQuery, db, generate_uuid
from ....util.instances import ReprBuilder

from ...user.models.user import User
from ...user.dbmodels.user import User

from ..transfer.models import BoardID


R byceps/services/board/models/last_category_view.py => byceps/services/board/dbmodels/last_category_view.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.board.models.last_category_view
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.board.dbmodels.last_category_view
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/board/models/last_topic_view.py => byceps/services/board/dbmodels/last_topic_view.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.board.models.last_topic_view
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.board.dbmodels.last_topic_view
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/board/models/posting.py => byceps/services/board/dbmodels/posting.py +3 -3
@@ 1,6 1,6 @@
"""
byceps.services.board.models.posting
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.board.dbmodels.posting
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 12,7 12,7 @@ from ....database import BaseQuery, db, generate_uuid
from ....typing import UserID
from ....util.instances import ReprBuilder

from ...user.models.user import User
from ...user.dbmodels.user import User

from ..transfer.models import TopicID


R byceps/services/board/models/topic.py => byceps/services/board/dbmodels/topic.py +3 -3
@@ 1,6 1,6 @@
"""
byceps.services.board.models.topic
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.board.dbmodels.topic
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 14,7 14,7 @@ from ....database import BaseQuery, db, generate_uuid
from ....typing import UserID
from ....util.instances import ReprBuilder

from ...user.models.user import User
from ...user.dbmodels.user import User

from ..transfer.models import CategoryID


M byceps/services/board/last_view_service.py => byceps/services/board/last_view_service.py +3 -3
@@ 12,9 12,9 @@ from typing import Optional
from ...database import upsert, upsert_many
from ...typing import UserID

from .models.last_category_view import LastCategoryView
from .models.last_topic_view import LastTopicView
from .models.topic import Topic as DbTopic
from .dbmodels.last_category_view import LastCategoryView
from .dbmodels.last_topic_view import LastTopicView
from .dbmodels.topic import Topic as DbTopic
from . import topic_query_service
from .transfer.models import CategoryID, CategoryWithLastUpdate, TopicID


M byceps/services/board/posting_command_service.py => byceps/services/board/posting_command_service.py +1 -1
@@ 22,7 22,7 @@ from ..user import service as user_service
from ..user.transfer.models import User

from .aggregation_service import aggregate_topic
from .models.posting import Posting as DbPosting
from .dbmodels.posting import Posting as DbPosting
from . import posting_query_service
from . import topic_query_service
from .transfer.models import PostingID, TopicID

M byceps/services/board/posting_query_service.py => byceps/services/board/posting_query_service.py +3 -3
@@ 15,9 15,9 @@ from ...util.iterables import index_of
from ..user import service as user_service
from ..user.transfer.models import User

from .models.category import Category as DbCategory
from .models.posting import Posting as DbPosting
from .models.topic import Topic as DbTopic
from .dbmodels.category import Category as DbCategory
from .dbmodels.posting import Posting as DbPosting
from .dbmodels.topic import Topic as DbTopic
from .transfer.models import BoardID, PostingID, TopicID



M byceps/services/board/topic_command_service.py => byceps/services/board/topic_command_service.py +3 -3
@@ 27,9 27,9 @@ from ..user import service as user_service
from ..user.transfer.models import User

from .aggregation_service import aggregate_category, aggregate_topic
from .models.category import Category as DbCategory
from .models.posting import InitialTopicPostingAssociation, Posting as DbPosting
from .models.topic import Topic as DbTopic
from .dbmodels.category import Category as DbCategory
from .dbmodels.posting import InitialTopicPostingAssociation, Posting as DbPosting
from .dbmodels.topic import Topic as DbTopic
from .posting_command_service import update_posting
from . import topic_query_service
from .transfer.models import CategoryID, TopicID

M byceps/services/board/topic_query_service.py => byceps/services/board/topic_query_service.py +3 -3
@@ 11,9 11,9 @@ from typing import List, Optional, Set

from ...database import db, Pagination, Query

from .models.category import Category as DbCategory
from .models.posting import Posting as DbPosting
from .models.topic import Topic as DbTopic
from .dbmodels.category import Category as DbCategory
from .dbmodels.posting import Posting as DbPosting
from .dbmodels.topic import Topic as DbTopic
from .transfer.models import BoardID, CategoryID, TopicID



R byceps/services/consent/models/__init__.py => byceps/services/brand/dbmodels/__init__.py +0 -0
R byceps/services/brand/models/brand.py => byceps/services/brand/dbmodels/brand.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.brand.models.brand
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.dbbrand.models.brand
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/brand/models/setting.py => byceps/services/brand/dbmodels/setting.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.brand.models.setting
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.brand.dbmodels.setting
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

M byceps/services/brand/service.py => byceps/services/brand/service.py +2 -2
@@ 11,8 11,8 @@ from typing import List, Optional
from ...database import db
from ...typing import BrandID

from .models.brand import Brand as DbBrand
from .models.setting import Setting as DbSetting
from .dbmodels.brand import Brand as DbBrand
from .dbmodels.setting import Setting as DbSetting
from .transfer.models import Brand



M byceps/services/brand/settings_service.py => byceps/services/brand/settings_service.py +1 -1
@@ 11,7 11,7 @@ from typing import Optional, Set
from ...database import db, upsert
from ...typing import BrandID

from .models.setting import Setting as DbSetting
from .dbmodels.setting import Setting as DbSetting
from .transfer.models import BrandSetting



M byceps/services/consent/consent_service.py => byceps/services/consent/consent_service.py +3 -3
@@ 12,10 12,10 @@ from typing import Dict, Iterable, Sequence, Set
from ...database import db
from ...typing import UserID

from ..verification_token.models import Token
from ..verification_token.dbmodels import Token

from .models.consent import Consent as DbConsent
from .models.subject import Subject as DbSubject
from .dbmodels.consent import Consent as DbConsent
from .dbmodels.subject import Subject as DbSubject
from .transfer.models import SubjectID



R byceps/services/news/models/__init__.py => byceps/services/consent/dbmodels/__init__.py +0 -0
R byceps/services/consent/models/brand_requirement.py => byceps/services/consent/dbmodels/brand_requirement.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.consent.models.brand_requirement
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.consent.dbmodels.brand_requirement
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/consent/models/consent.py => byceps/services/consent/dbmodels/consent.py +3 -3
@@ 1,6 1,6 @@
"""
byceps.services.consent.models.consent
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.consent.dbmodels.consent
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 11,7 11,7 @@ from datetime import datetime
from ....database import db
from ....typing import UserID

from ...user.models.user import User
from ...user.dbmodels.user import User

from ..transfer.models import SubjectID


R byceps/services/consent/models/subject.py => byceps/services/consent/dbmodels/subject.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.consent.models.subject
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.consent.dbmodels.subject
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

M byceps/services/consent/subject_service.py => byceps/services/consent/subject_service.py +3 -3
@@ 11,9 11,9 @@ from typing import Dict, Optional, Set
from ...database import db
from ...typing import BrandID

from .models.brand_requirement import BrandRequirement as DbBrandRequirement
from .models.consent import Consent as DbConsent
from .models.subject import Subject as DbSubject
from .dbmodels.brand_requirement import BrandRequirement as DbBrandRequirement
from .dbmodels.consent import Consent as DbConsent
from .dbmodels.subject import Subject as DbSubject
from .transfer.models import Subject, SubjectID



R byceps/services/email/models.py => byceps/services/email/dbmodels.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.email.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.email.dbmodels
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

M byceps/services/email/service.py => byceps/services/email/service.py +1 -1
@@ 15,7 15,7 @@ from ... import email
from ...typing import BrandID
from ...util.jobqueue import enqueue

from .models import EmailConfig as DbEmailConfig
from .dbmodels import EmailConfig as DbEmailConfig
from .transfer.models import EmailConfig, Message, Sender



R byceps/services/global_setting/models.py => byceps/services/global_setting/dbmodels.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.global_setting.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.global_setting.dbmodels
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

M byceps/services/global_setting/service.py => byceps/services/global_setting/service.py +1 -1
@@ 10,7 10,7 @@ from typing import Optional, Set

from ...database import db, upsert

from .models import Setting as DbSetting
from .dbmodels import Setting as DbSetting
from .transfer.models import GlobalSetting



M byceps/services/news/channel_service.py => byceps/services/news/channel_service.py +1 -1
@@ 13,7 13,7 @@ from ...typing import BrandID

from ..brand import service as brand_service

from .models.channel import Channel as DbChannel
from .dbmodels.channel import Channel as DbChannel
from .transfer.models import Channel, ChannelID



R byceps/services/party/models/__init__.py => byceps/services/news/dbmodels/__init__.py +0 -0
R byceps/services/news/models/channel.py => byceps/services/news/dbmodels/channel.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.news.models.channel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.news.dbmodels.channel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/news/models/image.py => byceps/services/news/dbmodels/image.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.news.models.image
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.news.dbmodels.image
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/news/models/item.py => byceps/services/news/dbmodels/item.py +3 -3
@@ 1,6 1,6 @@
"""
byceps.services.news.models.item
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.news.dbmodels.item
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 14,7 14,7 @@ from ....database import BaseQuery, db, generate_uuid
from ....typing import UserID
from ....util.instances import ReprBuilder

from ...user.models.user import User
from ...user.dbmodels.user import User

from ..transfer.models import ChannelID, ItemID


M byceps/services/news/image_service.py => byceps/services/news/image_service.py +1 -1
@@ 18,7 18,7 @@ from ...util.image.models import Dimensions, ImageType
from ..image import service as image_service
from ..user import service as user_service

from .models.image import Image as DbImage
from .dbmodels.image import Image as DbImage
from . import service as item_service
from .transfer.models import ChannelID, Image, ImageID, ItemID


M byceps/services/news/service.py => byceps/services/news/service.py +2 -2
@@ 19,8 19,8 @@ from ..user import service as user_service

from .channel_service import _db_entity_to_channel
from . import html_service
from .models.channel import Channel as DbChannel
from .models.item import (
from .dbmodels.channel import Channel as DbChannel
from .dbmodels.item import (
    CurrentVersionAssociation as DbCurrentVersionAssociation,
    Item as DbItem,
    ItemVersion as DbItemVersion,

M byceps/services/newsletter/command_service.py => byceps/services/newsletter/command_service.py +1 -1
@@ 11,7 11,7 @@ from datetime import datetime
from ...database import db
from ...typing import UserID

from .models import List as DbList, SubscriptionUpdate as DbSubscriptionUpdate
from .dbmodels import List as DbList, SubscriptionUpdate as DbSubscriptionUpdate
from .service import find_list, _db_entity_to_list
from .transfer.models import List, ListID
from .types import SubscriptionState

R byceps/services/newsletter/models.py => byceps/services/newsletter/dbmodels.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.newsletter.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.newsletter.dbmodels
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

M byceps/services/newsletter/service.py => byceps/services/newsletter/service.py +2 -2
@@ 21,9 21,9 @@ from typing import (
from ...database import BaseQuery, db
from ...typing import UserID

from ..user.models.user import User as DbUser
from ..user.dbmodels.user import User as DbUser

from .models import (
from .dbmodels import (
    List as DbList,
    Subscriber,
    SubscriptionUpdate as DbSubscriptionUpdate,

M byceps/services/orga/birthday_service.py => byceps/services/orga/birthday_service.py +3 -3
@@ 12,11 12,11 @@ from typing import Dict, Iterator, Optional, Sequence, Set, Tuple
from ...database import db

from ..user_avatar import service as user_avatar_service
from ..user.models.detail import UserDetail as DbUserDetail
from ..user.models.user import User as DbUser
from ..user.dbmodels.detail import UserDetail as DbUserDetail
from ..user.dbmodels.user import User as DbUser
from ..user.transfer.models import User, UserID

from .models import OrgaFlag as DbOrgaFlag
from .dbmodels import OrgaFlag as DbOrgaFlag
from .transfer.models import Birthday



R byceps/services/orga/models.py => byceps/services/orga/dbmodels.py +4 -4
@@ 1,6 1,6 @@
"""
byceps.services.orga.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.orga.dbmodels
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 10,8 10,8 @@ from ...database import db
from ...typing import BrandID, UserID
from ...util.instances import ReprBuilder

from ..brand.models.brand import Brand
from ..user.models.user import User
from ..brand.dbmodels.brand import Brand
from ..user.dbmodels.user import User


class OrgaFlag(db.Model):

M byceps/services/orga/service.py => byceps/services/orga/service.py +3 -3
@@ 11,12 11,12 @@ from typing import Dict, Optional, Sequence
from ...database import db
from ...typing import BrandID, UserID

from ..brand.models.brand import Brand as DbBrand
from ..brand.dbmodels.brand import Brand as DbBrand
from ..brand import service as brand_service
from ..user import event_service as user_event_service
from ..user.models.user import User as DbUser
from ..user.dbmodels.user import User as DbUser

from .models import OrgaFlag as DbOrgaFlag
from .dbmodels import OrgaFlag as DbOrgaFlag


def get_person_count_by_brand_id() -> Dict[BrandID, int]:

R byceps/services/orga_presence/models.py => byceps/services/orga_presence/dbmodels.py +3 -3
@@ 1,13 1,13 @@
"""
byceps.services.orga_presence.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.orga_presence.dbmodels
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""

from ...database import BaseQuery, db, generate_uuid
from ..user.models.user import User
from ..user.dbmodels.user import User


class TimeSlotQuery(BaseQuery):

M byceps/services/orga_presence/service.py => byceps/services/orga_presence/service.py +1 -1
@@ 17,7 17,7 @@ from ...database import db
from ...typing import PartyID
from ...util.datetime.range import create_adjacent_ranges, DateTimeRange

from .models import Presence as DbPresence, Task as DbTask
from .dbmodels import Presence as DbPresence, Task as DbTask
from .transfer.models import PresenceTimeSlot, TaskTimeSlot, TimeSlot



R byceps/services/orga_team/models.py => byceps/services/orga_team/dbmodels.py +4 -4
@@ 1,6 1,6 @@
"""
byceps.services.orga_team.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.orga_team.dbmodels
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 10,8 10,8 @@ from ...database import BaseQuery, db, generate_uuid
from ...typing import PartyID, UserID
from ...util.instances import ReprBuilder

from ..party.models.party import Party
from ..user.models.user import User
from ..party.dbmodels.party import Party
from ..user.dbmodels.user import User

from .transfer.models import OrgaTeamID


M byceps/services/orga_team/service.py => byceps/services/orga_team/service.py +3 -3
@@ 12,13 12,13 @@ from typing import Dict, Optional, Sequence, Set, Tuple
from ...database import db
from ...typing import PartyID, UserID

from ..orga.models import OrgaFlag as DbOrgaFlag
from ..orga.dbmodels import OrgaFlag as DbOrgaFlag
from ..party import service as party_service
from ..user.models.user import User as DbUser
from ..user.dbmodels.user import User as DbUser
from ..user import service as user_service
from ..user.transfer.models import User

from .models import Membership as DbMembership, OrgaTeam as DbOrgaTeam
from .dbmodels import Membership as DbMembership, OrgaTeam as DbOrgaTeam
from .transfer.models import (
    Member,
    Membership,

R byceps/services/seating/models/__init__.py => byceps/services/party/dbmodels/__init__.py +0 -0
R byceps/services/party/models/party.py => byceps/services/party/dbmodels/party.py +3 -3
@@ 1,6 1,6 @@
"""
byceps.services.party.models.party
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.party.dbmodels.party
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 13,7 13,7 @@ from ....database import db
from ....typing import BrandID, PartyID
from ....util.instances import ReprBuilder

from ...brand.models.brand import Brand
from ...brand.dbmodels.brand import Brand


class Party(db.Model):

R byceps/services/party/models/setting.py => byceps/services/party/dbmodels/setting.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.party.models.setting
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.party.dbmodels.setting
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

M byceps/services/party/service.py => byceps/services/party/service.py +3 -3
@@ 13,11 13,11 @@ from typing import Dict, List, Optional, Set, Union
from ...database import db, paginate, Pagination
from ...typing import BrandID, PartyID

from ..brand.models.brand import Brand as DbBrand
from ..brand.dbmodels.brand import Brand as DbBrand
from ..brand import service as brand_service

from .models.party import Party as DbParty
from .models.setting import Setting as DbSetting
from .dbmodels.party import Party as DbParty
from .dbmodels.setting import Setting as DbSetting
from .transfer.models import Party, PartyWithBrand



M byceps/services/party/settings_service.py => byceps/services/party/settings_service.py +1 -1
@@ 11,7 11,7 @@ from typing import Optional, Set
from ...database import db, upsert
from ...typing import PartyID

from .models.setting import Setting as DbSetting
from .dbmodels.setting import Setting as DbSetting
from .transfer.models import PartySetting



M byceps/services/seating/area_service.py => byceps/services/seating/area_service.py +3 -3
@@ 11,10 11,10 @@ from typing import Optional
from ...database import db, Pagination
from ...typing import PartyID

from ..ticketing.models.ticket import Ticket as DbTicket
from ..ticketing.dbmodels.ticket import Ticket as DbTicket

from .models.area import Area as DbArea
from .models.seat import Seat as DbSeat
from .dbmodels.area import Area as DbArea
from .dbmodels.seat import Seat as DbSeat


def create_area(party_id: PartyID, slug: str, title: str) -> DbArea:

R byceps/services/site/models/__init__.py => byceps/services/seating/dbmodels/__init__.py +0 -0
R byceps/services/seating/models/area.py => byceps/services/seating/dbmodels/area.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.seating.models.area
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.seating.dbmodels.area
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/seating/models/seat.py => byceps/services/seating/dbmodels/seat.py +4 -4
@@ 1,6 1,6 @@
"""
byceps.services.seating.models.seat
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.seating.dbmodels.seat
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 14,9 14,9 @@ from sqlalchemy.ext.hybrid import hybrid_property
from ....database import db, generate_uuid
from ....util.instances import ReprBuilder

from ...ticketing.models.category import Category
from ...ticketing.dbmodels.category import Category
from ...ticketing.transfer.models import TicketCategoryID
from ...user.models.user import User
from ...user.dbmodels.user import User

from .area import Area


R byceps/services/seating/models/seat_group.py => byceps/services/seating/dbmodels/seat_group.py +4 -4
@@ 1,6 1,6 @@
"""
byceps.services.seating.models.seat_group
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.seating.dbmodels.seat_group
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 12,8 12,8 @@ from ....database import db, generate_uuid
from ....typing import PartyID
from ....util.instances import ReprBuilder

from ...ticketing.models.category import Category
from ...ticketing.models.ticket_bundle import TicketBundle
from ...ticketing.dbmodels.category import Category
from ...ticketing.dbmodels.ticket_bundle import TicketBundle
from ...ticketing.transfer.models import TicketBundleID, TicketCategoryID

from .seat import Seat

M byceps/services/seating/seat_group_service.py => byceps/services/seating/seat_group_service.py +4 -4
@@ 11,12 11,12 @@ from typing import Optional, Sequence
from ...database import db
from ...typing import PartyID

from ..ticketing.models.ticket import Ticket as DbTicket
from ..ticketing.models.ticket_bundle import TicketBundle as DbTicketBundle
from ..ticketing.dbmodels.ticket import Ticket as DbTicket
from ..ticketing.dbmodels.ticket_bundle import TicketBundle as DbTicketBundle
from ..ticketing.transfer.models import TicketCategoryID

from .models.seat import Seat as DbSeat
from .models.seat_group import (
from .dbmodels.seat import Seat as DbSeat
from .dbmodels.seat_group import (
    Occupancy as DbSeatGroupOccupancy,
    SeatGroup as DbSeatGroup,
    SeatGroupAssignment as DbSeatGroupAssignment,

M byceps/services/seating/seat_service.py => byceps/services/seating/seat_service.py +4 -4
@@ 11,12 11,12 @@ from typing import Dict, List, Optional, Sequence, Set, Tuple
from ...database import db
from ...typing import PartyID

from ..ticketing.models.category import Category as DbTicketCategory
from ..ticketing.models.ticket import Ticket as DbTicket
from ..ticketing.dbmodels.category import Category as DbTicketCategory
from ..ticketing.dbmodels.ticket import Ticket as DbTicket
from ..ticketing.transfer.models import TicketCategory, TicketCategoryID

from .models.area import Area as DbArea
from .models.seat import Seat as DbSeat
from .dbmodels.area import Area as DbArea
from .dbmodels.seat import Seat as DbSeat
from .transfer.models import AreaID, SeatID, SeatUtilization



R byceps/services/snippet/models/__init__.py => byceps/services/shop/article/dbmodels/__init__.py +0 -0
R byceps/services/shop/article/models/article.py => byceps/services/shop/article/dbmodels/article.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.shop.article.models.article
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.shop.article.dbmodels.article
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/shop/article/models/attached_article.py => byceps/services/shop/article/dbmodels/attached_article.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.shop.article.models.attached_article
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.shop.article.dbmodels.attached_article
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/shop/article/models/number_sequence.py => byceps/services/shop/article/dbmodels/number_sequence.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.shop.article.models.sequence
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.shop.article.dbmodels.sequence
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

M byceps/services/shop/article/sequence_service.py => byceps/services/shop/article/sequence_service.py +1 -1
@@ 14,7 14,7 @@ from ....database import db

from ..shop.transfer.models import ShopID

from .models.number_sequence import ArticleNumberSequence as DbArticleNumberSequence
from .dbmodels.number_sequence import ArticleNumberSequence as DbArticleNumberSequence
from .transfer.models import (
    ArticleNumber,
    ArticleNumberSequence,

M byceps/services/shop/article/service.py => byceps/services/shop/article/service.py +5 -5
@@ 12,14 12,14 @@ from typing import List, Optional, Sequence, Set, Tuple

from ....database import BaseQuery, db, Pagination

from ..order.models.order import Order as DbOrder
from ..order.models.order_item import OrderItem as DbOrderItem
from ..order.dbmodels.order import Order as DbOrder
from ..order.dbmodels.order_item import OrderItem as DbOrderItem
from ..order.transfer.models import PaymentState
from ..shop.models import Shop as DbShop
from ..shop.dbmodels import Shop as DbShop
from ..shop.transfer.models import ShopID

from .models.article import Article as DbArticle
from .models.attached_article import AttachedArticle as DbAttachedArticle
from .dbmodels.article import Article as DbArticle
from .dbmodels.attached_article import AttachedArticle as DbAttachedArticle
from .models.compilation import ArticleCompilation, ArticleCompilationItem
from .transfer.models import (
    Article,

M byceps/services/shop/cart/models.py => byceps/services/shop/cart/models.py +1 -1
@@ 11,7 11,7 @@ from typing import List, Sequence

from ....util.instances import ReprBuilder

from ..article.models.article import Article as DbArticle
from ..article.dbmodels.article import Article as DbArticle


class CartItem:

R byceps/services/shop/catalog/models.py => byceps/services/shop/catalog/dbmodels.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.shop.catalog.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.shop.catalog.dbmodels
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

M byceps/services/shop/catalog/service.py => byceps/services/shop/catalog/service.py +1 -1
@@ 12,7 12,7 @@ from ....database import db

from ..article.transfer.models import ArticleNumber

from .models import (
from .dbmodels import (
    Catalog as DbCatalog,
    CatalogArticle as DbCatalogArticle,
    Collection as DbCollection,

M byceps/services/shop/order/action_registry_service.py => byceps/services/shop/order/action_registry_service.py +1 -1
@@ 11,7 11,7 @@ from ...user_badge.transfer.models import BadgeID

from ..article.transfer.models import ArticleNumber

from .models.order_action import Parameters
from .dbmodels.order_action import Parameters
from .transfer.models import PaymentState

from . import action_service

M byceps/services/shop/order/action_service.py => byceps/services/shop/order/action_service.py +1 -1
@@ 18,7 18,7 @@ from .actions.create_ticket_bundles import create_ticket_bundles
from .actions.create_tickets import create_tickets
from .actions.revoke_ticket_bundles import revoke_ticket_bundles
from .actions.revoke_tickets import revoke_tickets
from .models.order_action import OrderAction, Parameters
from .dbmodels.order_action import OrderAction, Parameters
from .transfer.models import Order, PaymentState



M byceps/services/shop/order/actions/award_badge.py => byceps/services/shop/order/actions/award_badge.py +1 -1
@@ 14,7 14,7 @@ from ....user_badge.transfer.models import BadgeAwarding, BadgeID
from ...article.transfer.models import ArticleNumber

from .. import event_service
from ..models.order_action import Parameters
from ..dbmodels.order_action import Parameters
from ..transfer.models import Order, OrderID



M byceps/services/shop/order/actions/create_ticket_bundles.py => byceps/services/shop/order/actions/create_ticket_bundles.py +2 -2
@@ 8,7 8,7 @@ byceps.services.shop.order.actions.create_ticket_bundles

from .....typing import UserID

from ....ticketing.models.ticket_bundle import TicketBundle
from ....ticketing.dbmodels.ticket_bundle import TicketBundle
from ....ticketing import (
    category_service as ticket_category_service,
    ticket_bundle_service,


@@ 17,7 17,7 @@ from ....ticketing import (
from ...article.transfer.models import ArticleNumber

from .. import event_service
from ..models.order_action import Parameters
from ..dbmodels.order_action import Parameters
from ..transfer.models import Order, OrderID

from ._ticketing import create_tickets_sold_event, send_tickets_sold_event

M byceps/services/shop/order/actions/create_tickets.py => byceps/services/shop/order/actions/create_tickets.py +2 -2
@@ 10,7 10,7 @@ from typing import Sequence

from .....typing import UserID

from ....ticketing.models.ticket import Ticket
from ....ticketing.dbmodels.ticket import Ticket
from ....ticketing import (
    category_service as ticket_category_service,
    ticket_creation_service,


@@ 19,7 19,7 @@ from ....ticketing import (
from ...article.transfer.models import ArticleNumber

from .. import event_service
from ..models.order_action import Parameters
from ..dbmodels.order_action import Parameters
from ..transfer.models import Order, OrderID

from ._ticketing import create_tickets_sold_event, send_tickets_sold_event

M byceps/services/shop/order/actions/revoke_ticket_bundles.py => byceps/services/shop/order/actions/revoke_ticket_bundles.py +1 -1
@@ 14,7 14,7 @@ from ....ticketing.transfer.models import TicketBundleID
from ...article.transfer.models import ArticleNumber

from .. import event_service
from ..models.order_action import Parameters
from ..dbmodels.order_action import Parameters
from ..transfer.models import Order, OrderID



M byceps/services/shop/order/actions/revoke_tickets.py => byceps/services/shop/order/actions/revoke_tickets.py +2 -2
@@ 10,13 10,13 @@ from typing import Sequence

from .....typing import UserID

from ....ticketing.models.ticket import Ticket
from ....ticketing.dbmodels.ticket import Ticket
from ....ticketing import ticket_revocation_service, ticket_service

from ...article.transfer.models import ArticleNumber

from .. import event_service
from ..models.order_action import Parameters
from ..dbmodels.order_action import Parameters
from ..transfer.models import Order, OrderID



R byceps/services/terms/models/__init__.py => byceps/services/shop/order/dbmodels/__init__.py +0 -0
R byceps/services/shop/order/models/number_sequence.py => byceps/services/shop/order/dbmodels/number_sequence.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.shop.order.models.sequence
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.shop.order.dbmodels.sequence
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/shop/order/models/order.py => byceps/services/shop/order/dbmodels/order.py +3 -3
@@ 1,6 1,6 @@
"""
byceps.services.shop.order.models.order
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.shop.order.dbmodels.order
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 15,7 15,7 @@ from .....database import BaseQuery, db, generate_uuid
from .....typing import UserID
from .....util.instances import ReprBuilder

from ....user.models.user import User
from ....user.dbmodels.user import User

from ...shop.transfer.models import ShopID


R byceps/services/shop/order/models/order_action.py => byceps/services/shop/order/dbmodels/order_action.py +3 -3
@@ 1,6 1,6 @@
"""
byceps.services.shop.order.models.order_action
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.shop.order.dbmodels.order_action
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 12,7 12,7 @@ from sqlalchemy.ext.hybrid import hybrid_property

from .....database import db, generate_uuid

from ...article.models.article import Article as DbArticle
from ...article.dbmodels.article import Article as DbArticle
from ...article.transfer.models import ArticleNumber

from ..transfer.models import PaymentState

R byceps/services/shop/order/models/order_event.py => byceps/services/shop/order/dbmodels/order_event.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.shop.order.models.order_event
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.shop.order.dbmodels.order_event
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/shop/order/models/order_item.py => byceps/services/shop/order/dbmodels/order_item.py +3 -3
@@ 1,6 1,6 @@
"""
byceps.services.shop.order.models.order_item
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.shop.order.dbmodels.order_item
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 10,7 10,7 @@ from decimal import Decimal

from .....database import db, generate_uuid

from ...article.models.article import Article as DbArticle
from ...article.dbmodels.article import Article as DbArticle
from ...article.transfer.models import ArticleNumber

from ..transfer.models import OrderItem as OrderItemTransferObject

M byceps/services/shop/order/event_service.py => byceps/services/shop/order/event_service.py +1 -1
@@ 11,7 11,7 @@ from typing import List, Sequence

from ....database import db

from .models.order_event import OrderEvent, OrderEventData
from .dbmodels.order_event import OrderEvent, OrderEventData
from .transfer.models import OrderID



M byceps/services/shop/order/ordered_articles_service.py => byceps/services/shop/order/ordered_articles_service.py +1 -1
@@ 13,7 13,7 @@ from ....database import db

from ..article.transfer.models import ArticleNumber

from .models.order_item import OrderItem as DbOrderItem
from .dbmodels.order_item import OrderItem as DbOrderItem
from .transfer.models import OrderItem, PaymentState



M byceps/services/shop/order/sequence_service.py => byceps/services/shop/order/sequence_service.py +1 -1
@@ 14,7 14,7 @@ from ....database import db

from ..shop.transfer.models import ShopID

from .models.number_sequence import OrderNumberSequence as DbOrderNumberSequence
from .dbmodels.number_sequence import OrderNumberSequence as DbOrderNumberSequence
from .transfer.models import (
    OrderNumber,
    OrderNumberSequence,

M byceps/services/shop/order/service.py => byceps/services/shop/order/service.py +4 -4
@@ 20,15 20,15 @@ from ...user import service as user_service

from ..article import service as article_service
from ..cart.models import Cart
from ..shop.models import Shop as DbShop
from ..shop.dbmodels import Shop as DbShop
from ..shop import service as shop_service
from ..shop.transfer.models import ShopID
from ..storefront import service as storefront_service
from ..storefront.transfer.models import StorefrontID

from .models.order import Order as DbOrder
from .models.order_event import OrderEvent as DbOrderEvent
from .models.order_item import OrderItem as DbOrderItem
from .dbmodels.order import Order as DbOrder
from .dbmodels.order_event import OrderEvent as DbOrderEvent
from .dbmodels.order_item import OrderItem as DbOrderItem
from .models.orderer import Orderer
from . import action_service, sequence_service
from .transfer.models import (

M byceps/services/shop/shipping/service.py => byceps/services/shop/shipping/service.py +3 -3
@@ 10,13 10,13 @@ from collections import Counter, defaultdict
from dataclasses import dataclass
from typing import Dict, Iterator, Sequence, Set

from ..article.models.article import Article as DbArticle
from ..article.dbmodels.article import Article as DbArticle

from ....database import db

from ..article.transfer.models import ArticleNumber
from ..order.models.order import Order as DbOrder
from ..order.models.order_item import OrderItem as DbOrderItem
from ..order.dbmodels.order import Order as DbOrder
from ..order.dbmodels.order_item import OrderItem as DbOrderItem
from ..order.transfer.models import PaymentState
from ..shop.transfer.models import ShopID


R byceps/services/shop/shop/models.py => byceps/services/shop/shop/dbmodels.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.shop.shop.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.shop.shop.dbmodels
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

M byceps/services/shop/shop/service.py => byceps/services/shop/shop/service.py +1 -1
@@ 11,7 11,7 @@ from typing import List, Optional, Set
from ....database import db
from ....typing import BrandID

from .models import Shop as DbShop
from .dbmodels import Shop as DbShop
from .transfer.models import Shop, ShopID



R byceps/services/shop/storefront/models.py => byceps/services/shop/storefront/dbmodels.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.shop.storefront.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.shop.storefront.dbmodels
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

M byceps/services/shop/storefront/service.py => byceps/services/shop/storefront/service.py +1 -1
@@ 14,7 14,7 @@ from ..catalog.transfer.models import CatalogID
from ..order.transfer.models import OrderNumberSequenceID
from ..shop.transfer.models import ShopID

from .models import Storefront as DbStorefront
from .dbmodels import Storefront as DbStorefront
from .transfer.models import Storefront, StorefrontID



R byceps/services/ticketing/models/__init__.py => byceps/services/site/dbmodels/__init__.py +0 -0
R byceps/services/site/models/setting.py => byceps/services/site/dbmodels/setting.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.site.models.setting
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.site.dbmodels.setting
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/site/models/site.py => byceps/services/site/dbmodels/site.py +3 -3
@@ 1,6 1,6 @@
"""
byceps.services.site.models.site
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.site.dbmodels.site
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 13,7 13,7 @@ from ....typing import BrandID, PartyID
from ....util.instances import ReprBuilder

from ...board.transfer.models import BoardID
from ...brand.models.brand import Brand
from ...brand.dbmodels.brand import Brand
from ...news.transfer.models import ChannelID as NewsChannelID
from ...shop.storefront.transfer.models import StorefrontID


M byceps/services/site/service.py => byceps/services/site/service.py +2 -2
@@ 17,8 17,8 @@ from ..brand import service as brand_service
from ..news.transfer.models import ChannelID as NewsChannelID
from ..shop.storefront.transfer.models import StorefrontID

from .models.site import Site as DbSite
from .models.setting import Setting as DbSetting
from .dbmodels.site import Site as DbSite
from .dbmodels.setting import Setting as DbSetting
from .transfer.models import Site, SiteID, SiteWithBrand



M byceps/services/site/settings_service.py => byceps/services/site/settings_service.py +1 -1
@@ 11,7 11,7 @@ from typing import Optional, Set
from ...database import db, upsert
from ...typing import PartyID

from .models.setting import Setting as DbSetting
from .dbmodels.setting import Setting as DbSetting
from .transfer.models import SiteID, SiteSetting



R byceps/services/tourney/models/__init__.py => byceps/services/snippet/dbmodels/__init__.py +0 -0
R byceps/services/snippet/models/mountpoint.py => byceps/services/snippet/dbmodels/mountpoint.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.snippet.models.mountpoint
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.snippet.dbmodels.mountpoint
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/snippet/models/snippet.py => byceps/services/snippet/dbmodels/snippet.py +3 -3
@@ 1,6 1,6 @@
"""
byceps.services.snippet.models.snippet
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.snippet.dbmodels.snippet
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Snippets of database-stored content. Can contain HTML and template
engine syntax. Can be embedded in other templates or mounted as full


@@ 20,7 20,7 @@ from ....database import BaseQuery, db, generate_uuid
from ....typing import UserID
from ....util.instances import ReprBuilder

from ...user.models.user import User
from ...user.dbmodels.user import User

from ..transfer.models import Scope, SnippetType


M byceps/services/snippet/mountpoint_service.py => byceps/services/snippet/mountpoint_service.py +2 -2
@@ 12,8 12,8 @@ from ...database import db

from ..site.transfer.models import SiteID

from .models.mountpoint import Mountpoint as DbMountpoint
from .models.snippet import CurrentVersionAssociation, Snippet, SnippetVersion
from .dbmodels.mountpoint import Mountpoint as DbMountpoint
from .dbmodels.snippet import CurrentVersionAssociation, Snippet, SnippetVersion
from .transfer.models import Mountpoint, MountpointID, SnippetID



M byceps/services/snippet/service.py => byceps/services/snippet/service.py +1 -1
@@ 14,7 14,7 @@ from ...events.snippet import SnippetCreated, SnippetDeleted, SnippetUpdated
from ...services.user import service as user_service
from ...typing import UserID

from .models.snippet import (
from .dbmodels.snippet import (
    CurrentVersionAssociation as DbCurrentVersionAssociation,
    Snippet as DbSnippet,
    SnippetVersion as DbSnippetVersion,

M byceps/services/terms/consent_service.py => byceps/services/terms/consent_service.py +3 -3
@@ 10,10 10,10 @@ from typing import Dict

from ...database import db

from ..consent.models.consent import Consent
from ..consent.models.subject import Subject
from ..consent.dbmodels.consent import Consent
from ..consent.dbmodels.subject import Subject

from .models.version import Version
from .dbmodels.version import Version
from .transfer.models import DocumentID, VersionID



R byceps/services/user/models/__init__.py => byceps/services/terms/dbmodels/__init__.py +0 -0
R byceps/services/terms/models/document.py => byceps/services/terms/dbmodels/document.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.terms.models.document
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.terms.dbmodels.document
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/terms/models/version.py => byceps/services/terms/dbmodels/version.py +4 -4
@@ 1,6 1,6 @@
"""
byceps.services.terms.models.version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.terms.dbmodels.version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 11,9 11,9 @@ from datetime import datetime
from ....database import db, generate_uuid
from ....util.instances import ReprBuilder

from ...consent.models.subject import Subject as ConsentSubject
from ...consent.dbmodels.subject import Subject as ConsentSubject
from ...consent.transfer.models import SubjectID as ConsentSubjectID
from ...snippet.models.snippet import SnippetVersion
from ...snippet.dbmodels.snippet import SnippetVersion
from ...snippet.transfer.models import SnippetVersionID

from ..transfer.models import DocumentID

M byceps/services/terms/document_service.py => byceps/services/terms/document_service.py +2 -2
@@ 13,8 13,8 @@ from ...typing import BrandID

from ..brand import settings_service as brand_settings_service

from .models.document import Document as DbDocument
from .models.version import Version as DbVersion
from .dbmodels.document import Document as DbDocument
from .dbmodels.version import Version as DbVersion
from .transfer.models import Document, DocumentID, VersionID



M byceps/services/terms/version_service.py => byceps/services/terms/version_service.py +2 -2
@@ 15,8 15,8 @@ from ..consent.transfer.models import SubjectID as ConsentSubjectID
from ..snippet.transfer.models import SnippetVersionID

from . import document_service
from .models.document import Document as DbDocument
from .models.version import Version as DbVersion
from .dbmodels.document import Document as DbDocument
from .dbmodels.version import Version as DbVersion
from .transfer.models import DocumentID, VersionID



M byceps/services/ticketing/attendance_service.py => byceps/services/ticketing/attendance_service.py +4 -4
@@ 17,17 17,17 @@ from sqlalchemy.dialects.postgresql import insert
from ...database import db, upsert
from ...typing import BrandID, PartyID, UserID

from ..party.models.party import Party as DbParty
from ..party.dbmodels.party import Party as DbParty
from ..party import service as party_service
from ..party.transfer.models import Party
from ..user import service as user_service
from ..user.transfer.models import User

from .models.archived_attendance import (
from .dbmodels.archived_attendance import (
    ArchivedAttendance as DbArchivedAttendance,
)
from .models.category import Category as DbCategory
from .models.ticket import Ticket as DbTicket
from .dbmodels.category import Category as DbCategory
from .dbmodels.ticket import Ticket as DbTicket


def create_archived_attendance(user_id: UserID, party_id: PartyID) -> None:

M byceps/services/ticketing/category_service.py => byceps/services/ticketing/category_service.py +2 -2
@@ 11,8 11,8 @@ from typing import Dict, Optional, Sequence
from ...database import db
from ...typing import PartyID

from .models.category import Category as DbCategory
from .models.ticket import Ticket as DbTicket
from .dbmodels.category import Category as DbCategory
from .dbmodels.ticket import Ticket as DbTicket
from .transfer.models import TicketCategory, TicketCategoryID



R byceps/services/user_badge/models/__init__.py => byceps/services/ticketing/dbmodels/__init__.py +0 -0
R byceps/services/ticketing/models/archived_attendance.py => byceps/services/ticketing/dbmodels/archived_attendance.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.ticketing.models.archived_attendance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.ticketing.dbmodels.archived_attendance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/ticketing/models/category.py => byceps/services/ticketing/dbmodels/category.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.ticketing.models.category
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.ticketing.dbmodels.category
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/ticketing/models/ticket.py => byceps/services/ticketing/dbmodels/ticket.py +4 -4
@@ 1,6 1,6 @@
"""
byceps.services.ticketing.models.ticket
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.ticketing.dbmodels.ticket
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 13,9 13,9 @@ from ....database import BaseQuery, db, generate_uuid
from ....typing import PartyID, UserID
from ....util.instances import ReprBuilder

from ...seating.models.seat import Seat
from ...seating.dbmodels.seat import Seat
from ...shop.order.transfer.models import OrderNumber
from ...user.models.user import User
from ...user.dbmodels.user import User

from ..transfer.models import TicketCategoryID, TicketCode


R byceps/services/ticketing/models/ticket_bundle.py => byceps/services/ticketing/dbmodels/ticket_bundle.py +3 -3
@@ 1,6 1,6 @@
"""
byceps.services.ticketing.models.ticket_bundle
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.ticketing.dbmodels.ticket_bundle
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 13,7 13,7 @@ from ....database import db, generate_uuid
from ....typing import PartyID, UserID
from ....util.instances import ReprBuilder

from ...user.models.user import User
from ...user.dbmodels.user import User

from ..transfer.models import TicketCategoryID


R byceps/services/ticketing/models/ticket_event.py => byceps/services/ticketing/dbmodels/ticket_event.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.ticketing.models.ticket_event
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.ticketing.dbmodels.ticket_event
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

M byceps/services/ticketing/event_service.py => byceps/services/ticketing/event_service.py +1 -1
@@ 11,7 11,7 @@ from typing import List

from ...database import db

from .models.ticket_event import TicketEvent, TicketEventData
from .dbmodels.ticket_event import TicketEvent, TicketEventData
from .transfer.models import TicketID



M byceps/services/ticketing/ticket_bundle_service.py => byceps/services/ticketing/ticket_bundle_service.py +3 -3
@@ 15,9 15,9 @@ from ...typing import PartyID, UserID

from ..shop.order.transfer.models import OrderNumber

from .models.category import Category as DbCategory
from .models.ticket import Ticket as DbTicket
from .models.ticket_bundle import TicketBundle as DbTicketBundle
from .dbmodels.category import Category as DbCategory
from .dbmodels.ticket import Ticket as DbTicket
from .dbmodels.ticket_bundle import TicketBundle as DbTicketBundle
from .ticket_creation_service import build_tickets, TicketCreationFailed
from .ticket_revocation_service import (
    _build_ticket_revoked_event as build_ticket_revoked_event,

M byceps/services/ticketing/ticket_creation_service.py => byceps/services/ticketing/ticket_creation_service.py +2 -2
@@ 16,8 16,8 @@ from ...typing import PartyID, UserID

from ..shop.order.transfer.models import OrderNumber

from .models.ticket import Ticket as DbTicket
from .models.ticket_bundle import TicketBundle as DbTicketBundle
from .dbmodels.ticket import Ticket as DbTicket
from .dbmodels.ticket_bundle import TicketBundle as DbTicketBundle
from . import ticket_code_service
from .transfer.models import TicketCategoryID


M byceps/services/ticketing/ticket_seat_management_service.py => byceps/services/ticketing/ticket_seat_management_service.py +3 -3
@@ 9,9 9,9 @@ byceps.services.ticketing.ticket_seat_management_service
from ...database import db
from ...typing import UserID

from ..seating.models.seat import Seat as DbSeat
from ..seating.dbmodels.seat import Seat as DbSeat
# Load `Seat.assignment` backref.
from ..seating.models.seat_group import SeatGroup as DbSeatGroup
from ..seating.dbmodels.seat_group import SeatGroup as DbSeatGroup
from ..seating import seat_service
from ..seating.transfer.models import SeatID



@@ 22,7 22,7 @@ from .exceptions import (
    TicketCategoryMismatch,
    TicketIsRevoked,
)
from .models.ticket import Ticket as DbTicket
from .dbmodels.ticket import Ticket as DbTicket
from . import ticket_service
from .transfer.models import TicketID


M byceps/services/ticketing/ticket_service.py => byceps/services/ticketing/ticket_service.py +6 -6
@@ 11,16 11,16 @@ from typing import Dict, Optional, Sequence, Set
from ...database import db, Pagination
from ...typing import PartyID, UserID

from ..party.models.party import Party as DbParty
from ..party.dbmodels.party import Party as DbParty
from ..party import service as party_service
from ..seating.models.seat import Seat as DbSeat
from ..seating.dbmodels.seat import Seat as DbSeat
from ..shop.order.transfer.models import OrderNumber
from ..user.models.user import User as DbUser
from ..user.dbmodels.user import User as DbUser

from . import event_service
from .models.category import Category as DbCategory
from .models.ticket import Ticket as DbTicket
from .models.ticket_event import TicketEvent as DbTicketEvent
from .dbmodels.category import Category as DbCategory
from .dbmodels.ticket import Ticket as DbTicket
from .dbmodels.ticket_event import TicketEvent as DbTicketEvent
from . import ticket_code_service
from .transfer.models import TicketCode, TicketID, TicketSaleStats


M byceps/services/ticketing/ticket_user_checkin_service.py => byceps/services/ticketing/ticket_user_checkin_service.py +1 -1
@@ 23,7 23,7 @@ from .exceptions import (
    UserAlreadyCheckedIn,
    UserIdUnknown,
)
from .models.ticket import Ticket as DbTicket
from .dbmodels.ticket import Ticket as DbTicket
from . import ticket_service
from .transfer.models import TicketID


R byceps/services/tourney/avatar/models.py => byceps/services/tourney/avatar/dbmodels.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.tourney.avatar.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.tourney.avatar.dbmodels
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

M byceps/services/tourney/avatar/service.py => byceps/services/tourney/avatar/service.py +1 -1
@@ 19,7 19,7 @@ from ...image import service as image_service
from ...image.service import ImageTypeProhibited  # Provide to view functions.
from ...user import service as user_service

from .models import Avatar
from .dbmodels import Avatar


MAXIMUM_DIMENSIONS = Dimensions(512, 512)

M byceps/services/tourney/category_service.py => byceps/services/tourney/category_service.py +2 -2
@@ 11,9 11,9 @@ from typing import List, Optional
from ...database import db
from ...typing import PartyID

from ..party.models.party import Party as DbParty
from ..party.dbmodels.party import Party as DbParty

from .models.tourney_category import TourneyCategory as DbTourneyCategory
from .dbmodels.tourney_category import TourneyCategory as DbTourneyCategory
from .transfer.models import TourneyCategory, TourneyCategoryID



A byceps/services/tourney/dbmodels/__init__.py => byceps/services/tourney/dbmodels/__init__.py +0 -0
R byceps/services/tourney/models/match.py => byceps/services/tourney/dbmodels/match.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.tourney.models.match
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.tourney.dbmodels.match
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/tourney/models/match_comment.py => byceps/services/tourney/dbmodels/match_comment.py +3 -3
@@ 1,6 1,6 @@
"""
byceps.services.tourney.models.match_comment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.tourney.dbmodels.match_comment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 11,7 11,7 @@ from datetime import datetime
from ....database import BaseQuery, db, generate_uuid
from ....typing import UserID

from ...user.models.user import User
from ...user.dbmodels.user import User

from ..transfer.models import MatchID


R byceps/services/tourney/models/participant.py => byceps/services/tourney/dbmodels/participant.py +3 -3
@@ 1,6 1,6 @@
"""
byceps.services.tourney.models.participant
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.tourney.dbmodels.participant
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 11,7 11,7 @@ from datetime import datetime
from ....database import db, generate_uuid
from ....util.instances import ReprBuilder

from ...user.models.user import User
from ...user.dbmodels.user import User

from ..transfer.models import TourneyID


R byceps/services/tourney/models/tourney.py => byceps/services/tourney/dbmodels/tourney.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.tourney.models.tourney
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.tourney.dbmodels.tourney
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/tourney/models/tourney_category.py => byceps/services/tourney/dbmodels/tourney_category.py +3 -3
@@ 1,6 1,6 @@
"""
byceps.services.tourney.models.tourney_category
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.tourney.dbmodels.tourney_category
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 12,7 12,7 @@ from ....database import db, generate_uuid
from ....typing import PartyID
from ....util.instances import ReprBuilder

from ...party.models.party import Party
from ...party.dbmodels.party import Party


class TourneyCategory(db.Model):

M byceps/services/tourney/match_comment_service.py => byceps/services/tourney/match_comment_service.py +1 -1
@@ 15,7 15,7 @@ from ...services.user import service as user_service
from ...services.user.transfer.models import User
from ...typing import PartyID, UserID

from .models.match_comment import MatchComment as DbMatchComment
from .dbmodels.match_comment import MatchComment as DbMatchComment
from .transfer.models import MatchID, MatchComment, MatchCommentID



M byceps/services/tourney/match_service.py => byceps/services/tourney/match_service.py +1 -1
@@ 10,7 10,7 @@ from typing import Optional

from ...database import db

from .models.match import Match as DbMatch
from .dbmodels.match import Match as DbMatch
from .transfer.models import Match, MatchID



M byceps/services/tourney/participant_service.py => byceps/services/tourney/participant_service.py +1 -1
@@ 10,7 10,7 @@ from typing import Optional, Set

from ...database import db

from .models.participant import Participant as DbParticipant
from .dbmodels.participant import Participant as DbParticipant
from . import tourney_service
from .transfer.models import Participant, ParticipantID, TourneyID


M byceps/services/tourney/tourney_service.py => byceps/services/tourney/tourney_service.py +3 -3
@@ 15,9 15,9 @@ from ...typing import PartyID, UserID
from ..party import service as party_service

from . import category_service
from .models.participant import Participant as DbParticipant
from .models.tourney import Tourney as DbTourney
from .models.tourney_category import TourneyCategory as DbTourneyCategory
from .dbmodels.participant import Participant as DbParticipant
from .dbmodels.tourney import Tourney as DbTourney
from .dbmodels.tourney_category import TourneyCategory as DbTourneyCategory
from .transfer.models import (
    Tourney,
    TourneyCategoryID,

M byceps/services/user/command_service.py => byceps/services/user/command_service.py +4 -4
@@ 19,13 19,13 @@ from ...events.user import (
)
from ...typing import UserID

from ..authorization.models import RoleID
from ..authorization import service as authorization_service
from ..authorization.transfer.models import RoleID

from . import event_service
from .models.detail import UserDetail as DbUserDetail
from .models.event import UserEventData
from .models.user import User as DbUser
from .dbmodels.detail import UserDetail as DbUserDetail
from .dbmodels.event import UserEventData
from .dbmodels.user import User as DbUser
from . import service as user_service



M byceps/services/user/creation_service.py => byceps/services/user/creation_service.py +2 -2
@@ 22,8 22,8 @@ from ..site.transfer.models import SiteID

from . import email_address_verification_service
from . import event_service
from .models.detail import UserDetail as DbUserDetail
from .models.user import User as DbUser
from .dbmodels.detail import UserDetail as DbUserDetail
from .dbmodels.user import User as DbUser
from . import service as user_service
from .transfer.models import User


A byceps/services/user/dbmodels/__init__.py => byceps/services/user/dbmodels/__init__.py +0 -0
R byceps/services/user/models/detail.py => byceps/services/user/dbmodels/detail.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.user.models.detail
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.user.dbmodels.detail
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/user/models/event.py => byceps/services/user/dbmodels/event.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.user.models.event
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.user.dbmodels.event
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/user/models/user.py => byceps/services/user/dbmodels/user.py +3 -3
@@ 1,6 1,6 @@
"""
byceps.services.user.models.user
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.user.dbmodels.user
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 16,7 16,7 @@ from werkzeug.utils import cached_property
from ....database import db, generate_uuid
from ....util.instances import ReprBuilder

from ...user_avatar.models import AvatarSelection
from ...user_avatar.dbmodels import AvatarSelection

from ..transfer.models import User as UserDTO


M byceps/services/user/deletion_service.py => byceps/services/user/deletion_service.py +1 -1
@@ 15,7 15,7 @@ from ...typing import UserID
from ..authorization import service as authorization_service

from . import event_service
from .models.user import User as DbUser
from .dbmodels.user import User as DbUser
from . import service as user_service



M byceps/services/user/email_address_verification_service.py => byceps/services/user/email_address_verification_service.py +1 -1
@@ 19,7 19,7 @@ from ..email import service as email_service
from ..site import service as site_service
from ..site.transfer.models import SiteID
from ..user import service as user_service
from ..verification_token.models import Token
from ..verification_token.dbmodels import Token
from ..verification_token import service as verification_token_service

from . import event_service as user_event_service

M byceps/services/user/event_service.py => byceps/services/user/event_service.py +1 -1
@@ 12,7 12,7 @@ from typing import List, Optional
from ...database import db
from ...typing import UserID

from .models.event import UserEvent as DbUserEvent, UserEventData
from .dbmodels.event import UserEvent as DbUserEvent, UserEventData


def create_event(

M byceps/services/user/service.py => byceps/services/user/service.py +4 -4
@@ 11,11 11,11 @@ from typing import Dict, Optional, Set, Tuple
from ...database import db, Query
from ...typing import PartyID, UserID

from ..orga_team.models import OrgaTeam, Membership as OrgaTeamMembership
from ..user_avatar.models import Avatar, AvatarSelection
from ..orga_team.dbmodels import OrgaTeam, Membership as OrgaTeamMembership
from ..user_avatar.dbmodels import Avatar, AvatarSelection

from .models.detail import UserDetail as DbUserDetail
from .models.user import User as DbUser
from .dbmodels.detail import UserDetail as DbUserDetail
from .dbmodels.user import User as DbUser
from .transfer.models import User, UserDetail, UserWithDetail



M byceps/services/user/stats_service.py => byceps/services/user/stats_service.py +1 -1
@@ 8,7 8,7 @@ byceps.services.user.stats_service

from datetime import datetime, timedelta

from .models.user import User as DbUser
from .dbmodels.user import User as DbUser


def count_users() -> int:

R byceps/services/user_avatar/models.py => byceps/services/user_avatar/dbmodels.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.user_avatar.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.user_avatar.dbmodels
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

M byceps/services/user_avatar/service.py => byceps/services/user_avatar/service.py +2 -2
@@ 16,10 16,10 @@ from ...util import upload

from ..image import service as image_service
from ..image.service import ImageTypeProhibited  # Provide to view functions.
from ..user.models.user import User as DbUser
from ..user.dbmodels.user import User as DbUser
from ..user import service as user_service

from .models import Avatar as DbAvatar, AvatarSelection as DbAvatarSelection
from .dbmodels import Avatar as DbAvatar, AvatarSelection as DbAvatarSelection
from .transfer.models import AvatarID, AvatarUpdate



M byceps/services/user_badge/awarding_service.py => byceps/services/user_badge/awarding_service.py +2 -2
@@ 17,8 17,8 @@ from ...typing import UserID
from ..user import event_service, service as user_service

from .badge_service import _db_entity_to_badge, find_badge, get_badges
from .models.awarding import BadgeAwarding as DbBadgeAwarding
from .models.badge import Badge as DbBadge
from .dbmodels.awarding import BadgeAwarding as DbBadgeAwarding
from .dbmodels.badge import Badge as DbBadge
from .transfer.models import (
    Badge,
    BadgeAwarding,

M byceps/services/user_badge/badge_service.py => byceps/services/user_badge/badge_service.py +1 -1
@@ 11,7 11,7 @@ from typing import Optional, Set
from ...database import db
from ...typing import BrandID

from .models.badge import Badge as DbBadge
from .dbmodels.badge import Badge as DbBadge
from .transfer.models import Badge, BadgeID



A byceps/services/user_badge/dbmodels/__init__.py => byceps/services/user_badge/dbmodels/__init__.py +0 -0
R byceps/services/user_badge/models/awarding.py => byceps/services/user_badge/dbmodels/awarding.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.user_badge.models.awarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.user_badge.dbmodels.awarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/user_badge/models/badge.py => byceps/services/user_badge/dbmodels/badge.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.user_badge.models.badge
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.user_badge.dbmodels.badge
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

R byceps/services/user_group/models.py => byceps/services/user_group/dbmodels.py +3 -3
@@ 1,6 1,6 @@
"""
byceps.services.user_group.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.user_group.dbmodels
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)


@@ 15,7 15,7 @@ from ...database import db, generate_uuid
from ...typing import PartyID, UserID
from ...util.instances import ReprBuilder

from ..user.models.user import User
from ..user.dbmodels.user import User


class UserGroup(db.Model):

M byceps/services/user_group/service.py => byceps/services/user_group/service.py +1 -1
@@ 11,7 11,7 @@ from typing import List, Optional
from ...database import db
from ...typing import PartyID, UserID

from .models import UserGroup
from .dbmodels import UserGroup


def create_group(

R byceps/services/verification_token/models.py => byceps/services/verification_token/dbmodels.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.verification_token.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.verification_token.dbmodels
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

M byceps/services/verification_token/service.py => byceps/services/verification_token/service.py +1 -1
@@ 11,7 11,7 @@ from typing import Optional
from ...database import db
from ...typing import UserID

from .models import Purpose, Token as DbToken
from .dbmodels import Purpose, Token as DbToken


def create_for_email_address_confirmation(user_id: UserID) -> DbToken:

R byceps/services/webhooks/models.py => byceps/services/webhooks/dbmodels.py +2 -2
@@ 1,6 1,6 @@
"""
byceps.services.webhooks.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.services.webhooks.dbmodels
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)

M byceps/services/webhooks/service.py => byceps/services/webhooks/service.py +1 -1
@@ 10,7 10,7 @@ from typing import Any, Dict, List, Optional

from ...database import db

from .models import OutgoingWebhook as DbOutgoingWebhook
from .dbmodels import OutgoingWebhook as DbOutgoingWebhook
from .transfer.models import EventSelectors, OutgoingWebhook, WebhookID



M scripts/_validators.py => scripts/_validators.py +1 -1
@@ 20,7 20,7 @@ from byceps.services.party.transfer.models import Party
from byceps.services.party import service as party_service
from byceps.services.site.transfer.models import Site, SiteID
from byceps.services.site import service as site_service
from byceps.services.user.models.user import User as DbUser
from byceps.services.user.dbmodels.user import User as DbUser
from byceps.services.user import service as user_service
from byceps.services.user.transfer.models import User
from byceps.typing import BrandID, PartyID, UserID

M scripts/clean_up_after_deleted_users.py => scripts/clean_up_after_deleted_users.py +13 -11
@@ 11,30 11,32 @@ from typing import Callable, Set
import click

from byceps.database import db
from byceps.services.authentication.password.models import Credential
from byceps.services.authentication.session.models.recent_login import (
from byceps.services.authentication.password.dbmodels import Credential
from byceps.services.authentication.session.dbmodels.recent_login import (
    RecentLogin,
)
from byceps.services.authentication.session.models.session_token import (
from byceps.services.authentication.session.dbmodels.session_token import (
    SessionToken,
)
from byceps.services.authorization.models import UserRole
from byceps.services.board.models.last_category_view import (
from byceps.services.authorization.dbmodels import UserRole
from byceps.services.board.dbmodels.last_category_view import (
    LastCategoryView as BoardLastCategoryView,
)
from byceps.services.board.models.last_topic_view import (
from byceps.services.board.dbmodels.last_topic_view import (
    LastTopicView as BoardLastTopicView,
)
from byceps.services.consent.models.consent import Consent
from byceps.services.newsletter.models import (
from byceps.services.consent.dbmodels.consent import Consent
from byceps.services.newsletter.dbmodels import (
    SubscriptionUpdate as NewsletterSubscriptionUpdate,
)
from byceps.services.user.models.event import UserEvent
from byceps.services.user.dbmodels.event import UserEvent
from byceps.services.user import service as user_service
from byceps.services.user_avatar.models import (
from byceps.services.user_avatar.dbmodels import (
    AvatarSelection as UserAvatarSelection,
)
from byceps.services.verification_token.models import Token as VerificationToken
from byceps.services.verification_token.dbmodels import (
    Token as VerificationToken,
)
from byceps.typing import UserID
from byceps.util.system import get_config_filename_from_env_or_exit


M scripts/find_logins_for_ipaddress.py => scripts/find_logins_for_ipaddress.py +1 -1
@@ 10,7 10,7 @@ from typing import Dict, List

import click

from byceps.services.user.models.event import UserEvent
from byceps.services.user.dbmodels.event import UserEvent
from byceps.services.user import service as user_service
from byceps.services.user.transfer.models import User
from byceps.typing import PartyID, UserID

M scripts/set_current_terms_version.py => scripts/set_current_terms_version.py +1 -1
@@ 12,7 12,7 @@ import click
from pick import pick

from byceps.services.terms import document_service as terms_document_service
from byceps.services.terms.models.version import Version
from byceps.services.terms.dbmodels.version import Version
from byceps.services.terms.transfer.models import DocumentID, VersionID
from byceps.services.terms import document_service, version_service
from byceps.util.system import get_config_filename_from_env_or_exit

M tests/helpers.py => tests/helpers.py +2 -2
@@ 22,8 22,8 @@ from byceps.services.party import service as party_service
from byceps.services.site import service as site_service
from byceps.services.user import creation_service as user_creation_service
from byceps.services.user.creation_service import UserCreationFailed
from byceps.services.user.models.detail import UserDetail as DbUserDetail
from byceps.services.user.models.user import User as DbUser
from byceps.services.user.dbmodels.detail import UserDetail as DbUserDetail
from byceps.services.user.dbmodels.user import User as DbUser


_CONFIG_PATH = Path('../config')

M tests/integration/api/v1/tourney/match/comments/test_create.py => tests/integration/api/v1/tourney/match/comments/test_create.py +1 -1
@@ 5,7 5,7 @@

import pytest

from byceps.services.tourney.models.match_comment import (
from byceps.services.tourney.dbmodels.match_comment import (
    MatchComment as DbMatchComment,
)
from byceps.services.tourney import (

M tests/integration/blueprints/admin/newsletter/test_views.py => tests/integration/blueprints/admin/newsletter/test_views.py +1 -1
@@ 8,7 8,7 @@ from datetime import datetime
import pytest

from byceps.database import db
from byceps.services.newsletter.models import (
from byceps.services.newsletter.dbmodels import (
    SubscriptionUpdate as DbSubscriptionUpdate,
)
from byceps.services.newsletter import command_service

M tests/integration/blueprints/admin/shop/order/test_views.py => tests/integration/blueprints/admin/shop/order/test_views.py +1 -1
@@ 10,7 10,7 @@ import pytest
from byceps.events.shop import ShopOrderCanceled, ShopOrderPaid
from byceps.services.shop.article import service as article_service
from byceps.services.shop.cart.models import Cart
from byceps.services.shop.order.models.order import Order
from byceps.services.shop.order.dbmodels.order import Order
from byceps.services.shop.order import service as order_service
from byceps.services.shop.order.transfer.models import (
    PaymentMethod,

M tests/integration/blueprints/common/authentication/password/test_views_password_update.py => tests/integration/blueprints/common/authentication/password/test_views_password_update.py +1 -1
@@ 5,7 5,7 @@

import pytest

from byceps.services.authentication.password.models import Credential
from byceps.services.authentication.password.dbmodels import Credential
from byceps.services.authentication.password import service as password_service
from byceps.services.authentication.session import service as session_service


M tests/integration/blueprints/site/shop/order/test_views.py => tests/integration/blueprints/site/shop/order/test_views.py +1 -1
@@ 9,7 9,7 @@ import pytest

from byceps.events.shop import ShopOrderPlaced
from byceps.services.shop.article import service as article_service
from byceps.services.shop.order.models.order import Order
from byceps.services.shop.order.dbmodels.order import Order
from byceps.services.shop.order import (
    sequence_service as order_sequence_service,
    service as order_service,

M tests/integration/blueprints/site/user/test_views_create.py => tests/integration/blueprints/site/user/test_views_create.py +3 -3
@@ 7,7 7,7 @@ from unittest.mock import patch

import pytest

from byceps.services.authentication.password.models import Credential
from byceps.services.authentication.password.dbmodels import Credential
from byceps.services.authentication.session import service as session_service
from byceps.services.authorization import service as authorization_service
from byceps.services.brand import settings_service as brand_settings_service


@@ 23,9 23,9 @@ from byceps.services.snippet import service as snippet_service
from byceps.services.snippet.transfer.models import Scope
from byceps.services.terms import document_service as terms_document_service
from byceps.services.terms import version_service as terms_version_service
from byceps.services.user.dbmodels.user import User
from byceps.services.user import event_service, service as user_service
from byceps.services.user.models.user import User
from byceps.services.verification_token.models import (
from byceps.services.verification_token.dbmodels import (
    Purpose as TokenPurpose,
    Token,
)

M tests/integration/services/authentication/test_update_password_hash.py => tests/integration/services/authentication/test_update_password_hash.py +1 -1
@@ 3,7 3,7 @@
:License: Revised BSD (see `LICENSE` file for details)
"""

from byceps.services.authentication.password.models import Credential
from byceps.services.authentication.password.dbmodels import Credential
from byceps.services.authentication.password import service as password_service
from byceps.services.user import event_service


M tests/integration/services/shop/order/test_ordered_articles_service.py => tests/integration/services/shop/order/test_ordered_articles_service.py +1 -1
@@ 8,8 8,8 @@ import pytest
from byceps.database import db
from byceps.services.shop.article import service as article_service
from byceps.services.shop.cart.models import Cart
from byceps.services.shop.order.dbmodels.order import Order as DbOrder
from byceps.services.shop.order import ordered_articles_service
from byceps.services.shop.order.models.order import Order as DbOrder
from byceps.services.shop.order import service as order_service
from byceps.services.shop.order.transfer.models import PaymentState


M tests/integration/services/ticketing/test_revocation.py => tests/integration/services/ticketing/test_revocation.py +1 -1
@@ 19,7 19,7 @@ from byceps.services.ticketing import (

# Import models to ensure the corresponding tables are created so
# `Seat.assignment` is available.
import byceps.services.seating.models.seat_group
import byceps.services.seating.dbmodels.seat_group


@pytest.fixture(scope='module')

M tests/integration/services/ticketing/test_seat_management_service.py => tests/integration/services/ticketing/test_seat_management_service.py +1 -1
@@ 21,7 21,7 @@ from byceps.services.ticketing.exceptions import (

# Import models to ensure the corresponding tables are created so
# `Seat.assignment` is available.
import byceps.services.seating.models.seat_group
import byceps.services.seating.dbmodels.seat_group


@pytest.fixture(scope='module')

M tests/integration/services/user/test_detail_extras.py => tests/integration/services/user/test_detail_extras.py +1 -1
@@ 5,7 5,7 @@

from byceps.database import db
from byceps.services.user import command_service as user_command_service
from byceps.services.user.models.detail import UserDetail
from byceps.services.user.dbmodels.detail import UserDetail


def test_set_and_remove(admin_app, make_user_with_detail):

M tests/integration/services/user_avatar/test_models_image_path.py => tests/integration/services/user_avatar/test_models_image_path.py +1 -1
@@ 8,7 8,7 @@ from uuid import UUID

import pytest

from byceps.services.user_avatar.models import Avatar
from byceps.services.user_avatar.dbmodels import Avatar
from byceps.util.image.models import ImageType

from tests.helpers import app_context

M tests/integration/services/user_badge/test_service_awarding.py => tests/integration/services/user_badge/test_service_awarding.py +1 -1
@@ 9,7 9,7 @@ from byceps.database import db
from byceps.events.user_badge import UserBadgeAwarded
from byceps.services.user import event_service
from byceps.services.user_badge import awarding_service, badge_service
from byceps.services.user_badge.models.awarding import (
from byceps.services.user_badge.dbmodels.awarding import (
    BadgeAwarding as DbBadgeAwarding,
)
from byceps.services.user_badge.transfer.models import QuantifiedBadgeAwarding

M tests/unit/services/shop/order/test_order_payment_state.py => tests/unit/services/shop/order/test_order_payment_state.py +1 -1
@@ 5,7 5,7 @@

from datetime import datetime

from byceps.services.shop.order.models.order import Order as DbOrder
from byceps.services.shop.order.dbmodels.order import Order as DbOrder
from byceps.services.shop.order.models.orderer import Orderer
from byceps.services.shop.order.service import _build_order
from byceps.services.shop.order.transfer.models import OrderNumber, PaymentState

M tests/unit/services/ticketing/test_models.py => tests/unit/services/ticketing/test_models.py +1 -1
@@ 7,7 7,7 @@ from uuid import UUID

import pytest

from byceps.services.ticketing.models.ticket import Ticket as DbTicket
from byceps.services.ticketing.dbmodels.ticket import Ticket as DbTicket


ANY_BUNDLE_ID = UUID('4138fcfb-cc18-45c0-aede-d49a8e279885')

M tests/unit/services/user/test_models_full_name.py => tests/unit/services/user/test_models_full_name.py +2 -2
@@ 7,8 7,8 @@ from datetime import datetime

import pytest

from byceps.services.user.models.user import User as DbUser
from byceps.services.user.models.detail import UserDetail as DbUserDetail
from byceps.services.user.dbmodels.user import User as DbUser
from byceps.services.user.dbmodels.detail import UserDetail as DbUserDetail


@pytest.mark.parametrize(

M tests/unit/services/user_avatar/test_models.py => tests/unit/services/user_avatar/test_models.py +1 -1
@@ 7,7 7,7 @@ from uuid import UUID

import pytest

from byceps.services.user_avatar.models import Avatar
from byceps.services.user_avatar.dbmodels import Avatar
from byceps.util.image.models import ImageType



M tests/unit/services/verification_token/test_models.py => tests/unit/services/verification_token/test_models.py +1 -1
@@ 9,7 9,7 @@ from uuid import UUID
from freezegun import freeze_time
import pytest

from byceps.services.verification_token.models import Purpose, Token
from byceps.services.verification_token.dbmodels import Purpose, Token


@pytest.mark.parametrize(