leaguemanager.models.account.email_verification_token

Module Contents

Classes

EmailVerificationToken

A user email verification token.

Data

email_verification_token

API

class leaguemanager.models.account.email_verification_token.EmailVerificationToken

Bases: leaguemanager.models.base.UUIDAuditBase

A user email verification token.

user_id: uuid.UUID

‘field(…)’

token: str | None

‘field(…)’

email: str | None

‘field(…)’

expires_at: datetime.datetime | None

‘field(…)’

used_at: datetime.datetime | None

‘field(…)’

property is_expired: bool

Check if the token has expired.

property is_used: bool

Check if the token has been used.

property is_valid: bool

Check if the token is valid (not expired and not used).

classmethod create_expires_at(hours: int = 24) datetime.datetime

Create an expiration datetime for the token.

Returns: datetime: The expiration datetime set to the current time plus the specified hours.

leaguemanager.models.account.email_verification_token.email_verification_token

‘Table(…)’