File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
backend/core/dtos/chat/rules Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 44
55from pydantic import BaseModel
66
7- from core .models import TelegramChatWhitelistExternalSource , TelegramChatWhitelist
7+ from core .dtos .chat .rules import EligibilityCheckType
8+ from core .models .rule import TelegramChatWhitelistExternalSource , TelegramChatWhitelist
89
910
1011class WhitelistRuleItemsDifferenceDTO (BaseModel ):
@@ -30,6 +31,7 @@ class WhitelistRuleCPO(BaseModel):
3031
3132class BaseWhitelistRuleDTO (BaseModel ):
3233 id : int
34+ type : EligibilityCheckType
3335 chat_id : int
3436 name : str
3537 description : str | None
@@ -44,6 +46,7 @@ class WhitelistRuleDTO(BaseWhitelistRuleDTO):
4446 def from_orm (cls , obj : TelegramChatWhitelist ) -> Self :
4547 return cls (
4648 id = obj .id ,
49+ type = EligibilityCheckType .WHITELIST ,
4750 chat_id = obj .chat_id ,
4851 name = obj .name ,
4952 description = obj .description ,
@@ -61,6 +64,7 @@ class WhitelistRuleExternalDTO(BaseWhitelistRuleDTO):
6164 def from_orm (cls , obj : TelegramChatWhitelistExternalSource ) -> Self :
6265 return cls (
6366 id = obj .id ,
67+ type = EligibilityCheckType .EXTERNAL_SOURCE ,
6468 chat_id = obj .chat_id ,
6569 url = obj .url ,
6670 name = obj .name ,
You can’t perform that action at this time.
0 commit comments