Skip to content

Commit

Permalink
Merge pull request #35 from kota-yata/feature/9-add-enum-props
Browse files Browse the repository at this point in the history
feat(models): add enum properties
  • Loading branch information
osoken authored Nov 14, 2023
2 parents 6358d78 + 36ea3e9 commit 498cfc6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions birdxplorer/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,11 +469,27 @@ class NotesBelievable(str, Enum):
believable_by_many = "BELIEVABLE_BY_MANY"
empty = ""

class NotesClassification(str, Enum):
not_misleading = "NOT_MISLEADING"
misinformed_or_potentially_misleading = "MISINFORMED_OR_POTENTIALLY_MISLEADING"

class NotesHarmful(str, Enum):
little_harm = "LITTLE_HARM"
considerable_harm = "CONSIDERABLE_HARM"
empty = ""

class NotesValidationDifficulty(str, Enum):
easy = "EASY"
challenging = "CHALLENGING"
empty = ""

class Note(BaseModel):
note_id: NoteId
note_author_participant_id: str = Field(pattern=r"^[0-9A-F]{64}$")
created_at_millis: TwitterTimestamp
tweet_id: str = Field(pattern=r"^[0-9]{9,19}$")
believable: NotesBelievable
classification: NotesClassification
harmful: NotesHarmful
validation_difficulty: NotesValidationDifficulty
summary: str

0 comments on commit 498cfc6

Please sign in to comment.