-
Notifications
You must be signed in to change notification settings - Fork 1
/
models.py
38 lines (29 loc) · 986 Bytes
/
models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from sqlalchemy import Column, Integer, String
from database import Base
class User(Base):
__tablename__ = 'user'
id = Column(Integer,
primary_key=True,
autoincrement=True)
id_user = Column(Integer,
unique=True)
tg_username = Column(String,
nullable=True,
default=None)
tg_fullname = Column(String,
nullable=True,
default=None)
class People(Base):
__tablename__ = 'people'
id = Column(Integer,
primary_key=True,
autoincrement=True)
telegram_user_id = Column(Integer,
unique=True,
nullable=False)
full_name = Column(String,
nullable=False)
location = Column(String,
nullable=True)
photo_id = Column(String,
nullable=True)