Skip to content

Commit 50ea6f9

Browse files
refactor: models
1 parent 95991af commit 50ea6f9

File tree

2 files changed

+6
-3
lines changed
  • packages
    • models-library/src/models_library/rpc/notifications
    • service-library/src/servicelib/rabbitmq/rpc_interfaces/notifications

2 files changed

+6
-3
lines changed

packages/models-library/src/models_library/rpc/notifications/notifications.py renamed to packages/models-library/src/models_library/rpc/notifications/messages.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1+
from abc import ABC
12
from typing import Annotated, Any, Literal, TypeAlias
23

34
from pydantic import BaseModel, Field
45

56

6-
class _BaseRecipient(BaseModel):
7+
class BaseRecipient(BaseModel, ABC):
78
type: str
89

910

10-
class SMSRecipient(_BaseRecipient):
11+
class SMSRecipient(BaseRecipient):
1112
type: Literal["sms"]
1213
phone_number: str
1314

1415

15-
class EmailRecipient(_BaseRecipient):
16+
class EmailRecipient(BaseRecipient):
1617
type: Literal["email"]
1718
address: str
1819

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
async def send_notification_message():
2+
pass

0 commit comments

Comments
 (0)