aboutsummaryrefslogtreecommitdiff
path: root/models/payment.py
diff options
context:
space:
mode:
Diffstat (limited to 'models/payment.py')
-rw-r--r--models/payment.py16
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 @@
1from datetime import datetime
2
3from sqlalchemy import ForeignKey
4from sqlalchemy.orm import Mapped, mapped_column
5
6from models import BaseTable, Invoice, User
7
8
9class 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]