Skip to content

Why all the schemas have a class with mixins and it's not used anywhere in the code #241

@Jkrox

Description

@Jkrox

class Post(TimestampSchema, PostBase, UUIDSchema, PersistentDeletion):
media_url: Annotated[
str | None,
Field(pattern=r"^(https?|ftp)://[^\s/$.?#].[^\s]*$", examples=["https://www.postimageurl.com"], default=None),
]
created_by_user_id: int

class RateLimit(TimestampSchema, RateLimitBase):
tier_id: int
name: Annotated[str | None, Field(default=None, examples=["users:5:60"])]

class User(TimestampSchema, UserBase, UUIDSchema, PersistentDeletion):
profile_image_url: Annotated[str, Field(default="https://www.profileimageurl.com")]
hashed_password: str
is_superuser: bool = False
tier_id: int | None = None

what is the purpose for these schemas?

Newbie question because I'm starting to customize the code for my own purposes, but I can't get this unused stuff.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions