diff options
| author | Tolmachev Igor <me@igorek.dev> | 2026-03-22 19:56:47 +0300 |
|---|---|---|
| committer | Tolmachev Igor <me@igorek.dev> | 2026-03-22 20:19:27 +0300 |
| commit | 536d022e8a55f6e53f01dfb7e0fae2ef24385aad (patch) | |
| tree | 721d7195db7fc12c725b27301f77e345df64d1b4 /models/payment.py | |
| download | vpn_manager_bot-536d022e8a55f6e53f01dfb7e0fae2ef24385aad.tar.gz vpn_manager_bot-536d022e8a55f6e53f01dfb7e0fae2ef24385aad.zip | |
Init project
Diffstat (limited to 'models/payment.py')
| -rw-r--r-- | models/payment.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/models/payment.py b/models/payment.py new file mode 100644 index 0000000..2b1cb90 --- /dev/null +++ b/models/payment.py | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | from datetime import datetime | ||
| 2 | |||
| 3 | from sqlalchemy import ForeignKey | ||
| 4 | from sqlalchemy.orm import Mapped, mapped_column | ||
| 5 | |||
| 6 | from models import BaseTable, Invoice, User | ||
| 7 | |||
| 8 | |||
| 9 | class Payment(BaseTable): | ||
| 10 | __tablename__ = "payment" | ||
| 11 | |||
| 12 | id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True) | ||
| 13 | user_id: Mapped[int] = mapped_column(ForeignKey(User.id)) | ||
| 14 | invoice_id: Mapped[int] = mapped_column(ForeignKey(Invoice.id)) | ||
| 15 | receipt_file_id: Mapped[str] | ||
| 16 | datetime: Mapped[datetime] | ||
