백오피스 추가 및 이미지태그 예외처리
This commit is contained in:
1 parent
1e3da98c6a
commit
37bf9f54ee
34 files changed
+1530
-73
No files matched your search
@@ -16,6 +16,7 @@ from app.database.session import Base
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from app.credit.models import CreditChargeRequest, CreditTransaction
|
||||
from app.home.models import Project
|
||||
|
||||
|
||||
@@ -276,6 +277,24 @@ class User(Base):
|
||||
lazy="selectin",
|
||||
)
|
||||
|
||||
credit_requests: Mapped[List["CreditChargeRequest"]] = relationship(
|
||||
"CreditChargeRequest",
|
||||
foreign_keys="CreditChargeRequest.user_uuid",
|
||||
primaryjoin="User.user_uuid == CreditChargeRequest.user_uuid",
|
||||
back_populates="user",
|
||||
cascade="all, delete-orphan",
|
||||
lazy="noload",
|
||||
)
|
||||
|
||||
credit_transactions: Mapped[List["CreditTransaction"]] = relationship(
|
||||
"CreditTransaction",
|
||||
foreign_keys="CreditTransaction.user_uuid",
|
||||
primaryjoin="User.user_uuid == CreditTransaction.user_uuid",
|
||||
back_populates="user",
|
||||
cascade="all, delete-orphan",
|
||||
lazy="noload",
|
||||
)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return (
|
||||
f"<User("
|
||||
|
||||
Reference in new issue
Block a user