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>
13 lines
492 B
Python
13 lines
492 B
Python
from titles.idac.model.season2.factory_model import CarDto, LotteryDto
|
|
from titles.idac.schema.model.factory import CarDb, LotteryDb
|
|
|
|
|
|
class IDACFactoryMapper:
|
|
def lottery_to_dto(self, lottery: LotteryDb) -> LotteryDto:
|
|
return LotteryDto.model_validate(lottery)
|
|
|
|
def car_to_dto(self, car: CarDb) -> CarDto:
|
|
return CarDto.model_validate(car)
|
|
|
|
def cars_to_dto_list(self, cars_db: list[CarDb]) -> list[CarDto]:
|
|
return [self.car_to_dto(car) for car in cars_db] |