-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
21 lines (17 loc) · 715 Bytes
/
Copy pathmodels.py
File metadata and controls
21 lines (17 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from flask_sqlalchemy import SQLAlchemy
from datetime import datetime
db = SQLAlchemy()
class JournalEntry(db.Model):
id = db.Column(db.Integer, primary_key=True)
content = db.Column(db.Text, nullable=False)
feedback = db.Column(db.Text, nullable=False)
date = db.Column(db.DateTime, default=datetime.utcnow)
class DistortionType(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(100))
count = db.Column(db.Integer, default=1)
class DistortedPhrase(db.Model):
id = db.Column(db.Integer, primary_key=True)
pattern = db.Column(db.String(100))
phrase = db.Column(db.String(300))
count = db.Column(db.Integer, default=1)