feat(db): export methods

This commit is contained in:
2023-08-31 22:18:11 +08:00
parent 167f72f9bb
commit 844568db1a
4 changed files with 47 additions and 1 deletions

View File

@ -0,0 +1,19 @@
from ...models import Score
from .types import ScoreExport
def score(score: Score) -> ScoreExport:
return {
"id": score.id,
"song_id": score.song_id,
"rating_class": score.rating_class,
"score": score.score,
"pure": score.pure,
"far": score.far,
"lost": score.lost,
"date": score.date,
"max_recall": score.max_recall,
"modifier": score.modifier,
"clear_type": score.clear_type,
"comment": score.comment,
}