# generated by datamodel-codegen:
#   filename:  auth/passwordResetToken.json
#   timestamp: 2022-10-04T14:49:18+00:00

from __future__ import annotations

from typing import Optional

from pydantic import BaseModel, Extra, Field

from ..type import basic
from . import emailVerificationToken


class PasswordResetToken(BaseModel):
    class Config:
        extra = Extra.forbid

    token: basic.Uuid = Field(..., description='Unique Refresh Token for user')
    userId: basic.Uuid = Field(
        ..., description='User Id of the User this refresh token is given to'
    )
    tokenType: Optional[emailVerificationToken.TokenType] = Field(
        TokenType.PASSWORD_RESET, description='Token Type'
    )
    expiryDate: basic.Timestamp = Field(
        ..., description='Expiry Date-Time of the token'
    )
    isActive: Optional[bool] = Field(True, description='Expiry Date-Time of the token')
    isClaimed: Optional[bool] = Field(
        False, description='Expiry Date-Time of the token'
    )
