-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb_model.py
More file actions
28 lines (22 loc) · 778 Bytes
/
db_model.py
File metadata and controls
28 lines (22 loc) · 778 Bytes
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
from flask_sqlalchemy import SQLAlchemy
from flask_login import UserMixin
from sqlalchemy import JSON
db = SQLAlchemy()
class Clients(db.Model):
id = db.Column(db.Integer,primary_key = True)
name = db.Column(db.String)
date= db.Column(db.Date)
time = db.Column(db.Time)
phone = db.Column(db.Integer)
work_type = db.Column(db.String)
msg_sent = db.Column(db.Boolean)
delete_error = db.Column(db.Boolean)
class User(db.Model,UserMixin):
id = db.Column(db.Integer,primary_key = True)
name = db.Column(db.String(100))
password_hash = db.Column(db.String(200))
class Log(db.Model):
id = db.Column(db.Integer,primary_key = True)
client = db.Column(db.JSON)
response = db.Column(db.JSON)
datetime = db.Column(db.String)