mirror of
https://gitea.tendokyu.moe/Dniel97/artemis.git
synced 2026-09-22 22:28:25 +03:00
## Changes: - [x] Added database upgrade script for season 3 tables - [x] Completly implement season 3 - [x] Teams are fully functional as intended - [x] Time Release is properly updated for season 3 (v2.10.00) - [x] New accounts can be created and saved in db - [x] Old 2eason 2 accounts can be transfered to season 3 - [x] Season independed config has been added inclusive version specific configs Co-authored-by: puniru <puniru@posteo.jp> Reviewed-on: https://gitea.tendokyu.moe/Dniel97/artemis-IDAC/pulls/1 Co-authored-by: Dniel97 <Dniel97@noreply.gitea.tendokyu.moe> Co-committed-by: Dniel97 <Dniel97@noreply.gitea.tendokyu.moe>
33 lines
1.2 KiB
Python
33 lines
1.2 KiB
Python
from sqlalchemy.engine import Row
|
|
|
|
from titles.idac.model.season2.user_model import *
|
|
from titles.idac.schema.model.profile import *
|
|
|
|
|
|
class IDACProfileMapper:
|
|
def profile_to_dto(self, profile: ProfileDb) -> ProfileDto:
|
|
return ProfileDto.model_validate(profile)
|
|
|
|
def profile_config_to_dto(self, config: ProfileConfigDb) -> ProfileConfigDto:
|
|
return ProfileConfigDto.model_validate(config)
|
|
|
|
def profile_avatar_to_dto(self, avatar: ProfileAvatarDb) -> ProfileAvatarDto:
|
|
return ProfileAvatarDto.model_validate(avatar)
|
|
|
|
def profile_rank_to_dto(self, rank: ProfileRankDb) -> ProfileRankDto:
|
|
return ProfileRankDto.model_validate(rank)
|
|
|
|
def profile_stock_to_dto(self, stock: ProfileStockDb) -> ProfileStockDto:
|
|
return ProfileStockDto.model_validate(stock)
|
|
|
|
def profile_theory_to_dto(self, theory: ProfileTheoryDb) -> ProfileTheoryDto:
|
|
return ProfileTheoryDto.model_validate(theory)
|
|
|
|
def profile_tips_to_dto(self, tips: ProfileTipsDb) -> ProfileTipsDto:
|
|
return ProfileTipsDto.model_validate(tips)
|
|
|
|
def profile_config_dto_to_config_data(
|
|
self, config: ProfileConfigDto
|
|
) -> Season2ConfigData:
|
|
return Season2ConfigData.model_validate(config)
|