diff --git a/src/models.py b/src/models.py index 3927675..84bea70 100644 --- a/src/models.py +++ b/src/models.py @@ -8,13 +8,13 @@ class AnimeCreate(DocumentedModel): """Request to subscribe to an anime. Attributes: - seadex_id: Id of the anime on SeaDex. SeaDex mirrors the AniList ids, + anilist_id: Id of the anime on SeaDex. SeaDex mirrors the AniList ids, so this is also the anime's AniList id. Must be positive. custom_name: Name the subscriber wants to see in the notifications for this anime, at most 255 characters. If it is not set, the name stored from AniList is used. Blank input becomes None. """ - seadex_id: int = Field(gt=0) + anilist_id: int = Field(gt=0) custom_name: str | None = Field(default=None, max_length=255) @field_validator("custom_name", mode="before") @@ -41,9 +41,10 @@ class AnimeRemove(DocumentedModel): """Request to unsubscribe from an anime. Attributes: - seadex_id: Id of the anime on SeaDex, which is also its AniList id. + anilist_id: Id of the anime on SeaDex. SeaDex mirrors the AniList ids, + so this is also the anime's AniList id. Must be positive. """ - seadex_id: int + anilist_id: int = Field(gt=0) class AnimeEntry(DocumentedModel): """A subscribed anime, as returned to the subscriber.