-
Notifications
You must be signed in to change notification settings - Fork 0
/
data_access.py
27 lines (23 loc) · 1.11 KB
/
data_access.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
from datetime import datetime
from . import db
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
full_name = db.Column(db.TEXT, nullable=True)
cellphone = db.Column(db.TEXT, unique=True, nullable=True)
id_number = db.Column(db.Integer, unique=True, nullable=True)
address = db.Column(db.TEXT, nullable=True)
address_reference = db.Column(db.TEXT, nullable=True)
email = db.Column(db.TEXT, unique=True, nullable=True)
status = db.Column(db.TEXT, nullable=True)
registrationDate = db.Column(db.DateTime, default = datetime.utcnow)
class Conversations(db.Model):
id = db.Column(db.Integer, primary_key=True)
cellphone = db.Column(db.TEXT, unique=True, nullable=False)
msg = db.Column(db.TEXT, nullable=True)
ex_funct = db.Column(db.TEXT, nullable=True)
hlVl0 = db.Column(db.Integer, nullable=False)
hlVl1 = db.Column(db.Integer, nullable=False)
hlVl2 = db.Column(db.Integer, nullable=False)
hlVl3 = db.Column(db.Integer, nullable=False)
status = db.Column(db.TEXT, nullable=True)
date_time = db.Column(db.DateTime, default = datetime.utcnow)