summary refs log tree commit diff
path: root/models.py
diff options
context:
space:
mode:
authorMatt Arnold2025-04-06 21:06:53 -0400
committerMatt Arnold2025-04-06 21:06:53 -0400
commitc26d3c09abea8aac5cdad752e23f19e5c8e98cd9 (patch)
tree2d4a2ad21ab4f5dfb33420a77f0b28b2b3b23c47 /models.py
have gpt start us off
Diffstat (limited to 'models.py')
-rw-r--r--models.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/models.py b/models.py
new file mode 100644
index 0000000..955a70a
--- /dev/null
+++ b/models.py
@@ -0,0 +1,14 @@
+from peewee import Model, CharField, TextField, DateTimeField
+from datetime import datetime
+from app import db
+
+class BaseModel(Model):
+    class Meta:
+        database = db
+
+class Post(BaseModel):
+    title = CharField()
+    content = TextField()
+    created_at = DateTimeField(default=datetime.now)
+
+db.create_tables([Post])
\ No newline at end of file