fix(event): failed to find name User
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
from datetime import UTC, datetime
|
from datetime import UTC, datetime
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
import json
|
import json
|
||||||
@@ -16,7 +14,7 @@ from sqlmodel import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from app.database.lazer_user import User
|
from .lazer_user import User
|
||||||
|
|
||||||
|
|
||||||
class EventType(str, Enum):
|
class EventType(str, Enum):
|
||||||
|
|||||||
@@ -156,8 +156,8 @@ class User(AsyncAttrs, UserBase, table=True):
|
|||||||
rank_history: list[RankHistory] = Relationship(
|
rank_history: list[RankHistory] = Relationship(
|
||||||
back_populates="user",
|
back_populates="user",
|
||||||
)
|
)
|
||||||
|
events: list[Event] = Relationship(back_populates="user")
|
||||||
|
|
||||||
events: list["Event"] = Relationship(back_populates="user")
|
|
||||||
email: str = Field(max_length=254, unique=True, index=True, exclude=True)
|
email: str = Field(max_length=254, unique=True, index=True, exclude=True)
|
||||||
priv: int = Field(default=1, exclude=True)
|
priv: int = Field(default=1, exclude=True)
|
||||||
pw_bcrypt: str = Field(max_length=60, exclude=True)
|
pw_bcrypt: str = Field(max_length=60, exclude=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user