From fc5d6f90bcda1078bcf0e52c3bbf1d1070a4ee90 Mon Sep 17 00:00:00 2001 From: Oleg Yurchik Date: Thu, 21 Dec 2023 13:30:08 +0300 Subject: [PATCH] Add legacy emotions --- soul_diary/ui/app/models.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/soul_diary/ui/app/models.py b/soul_diary/ui/app/models.py index 842070d..cef8627 100644 --- a/soul_diary/ui/app/models.py +++ b/soul_diary/ui/app/models.py @@ -25,6 +25,11 @@ class Emotion(str, enum.Enum): DELIGHT = "восхищение" +class EmotionLegacy(str, enum.Enum): + MADNESS = "бешенство" + FORCE = "сила" + + class BackendType(str, enum.Enum): LOCAL = "local" SOUL = "soul" @@ -32,7 +37,7 @@ class BackendType(str, enum.Enum): class Sense(BaseModel): id: uuid.UUID - emotions: list[Emotion] = [] + emotions: list[Emotion | EmotionLegacy] = [] feelings: constr(min_length=1, strip_whitespace=True) body: constr(min_length=1, strip_whitespace=True) desires: constr(min_length=1, strip_whitespace=True)