diff options
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] | ||
