2022-04-27 12:14:58 -07:00
|
|
|
import datetime
|
|
|
|
|
2023-11-28 23:50:50 -08:00
|
|
|
from pydantic import BaseModel
|
2022-04-27 12:14:58 -07:00
|
|
|
|
2023-05-23 14:24:13 -07:00
|
|
|
from ..models.uuid import Uuid
|
2022-04-27 12:14:58 -07:00
|
|
|
|
2023-11-27 16:01:20 -08:00
|
|
|
|
2023-11-28 23:50:50 -08:00
|
|
|
class Session(BaseModel):
|
2023-11-27 16:01:20 -08:00
|
|
|
"""An authentication session.
|
|
|
|
|
2023-11-28 23:50:50 -08:00
|
|
|
For our UIs, these are automatically created by Next.js."""
|
2023-11-27 16:01:20 -08:00
|
|
|
|
2023-11-28 23:50:50 -08:00
|
|
|
created_at: datetime.datetime
|
2023-11-27 16:01:20 -08:00
|
|
|
|
2023-11-28 23:50:50 -08:00
|
|
|
expires: datetime.datetime
|
2023-11-27 16:01:20 -08:00
|
|
|
|
2023-11-28 23:50:50 -08:00
|
|
|
id: Uuid
|
2023-11-27 16:01:20 -08:00
|
|
|
|
2023-11-28 23:50:50 -08:00
|
|
|
session_token: Uuid
|
2023-11-27 16:01:20 -08:00
|
|
|
|
2023-11-28 23:50:50 -08:00
|
|
|
updated_at: datetime.datetime
|
2023-11-27 16:01:20 -08:00
|
|
|
|
2023-11-28 23:50:50 -08:00
|
|
|
user_id: Uuid
|