-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
21 lines (18 loc) · 708 Bytes
/
models.py
File metadata and controls
21 lines (18 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from sqlalchemy.schema import Column
from sqlalchemy.types import String, Integer, DECIMAL, Boolean
from db import Base
class User(Base):
__tablename__ = "users"
id = Column(Integer, primary_key=True, index=True)
username = Column(String(150))
email = Column(String(150))
password = Column(String(150))
full_name = Column(String(150))
disabled = Column(Boolean)
class TransactionInfo(Base):
__tablename__ = "transaction_info"
id = Column(Integer, primary_key=True, index=True)
name = Column(String(30), index=True)
description = Column(String(200), index=True)
amount = Column(DECIMAL(precision=10, scale=2))
currency = Column(String(10), index=True)