first commit

This commit is contained in:
usernames122
2025-08-10 23:42:02 +02:00
commit 877a246134
24 changed files with 957 additions and 0 deletions

17
models.py Normal file
View File

@@ -0,0 +1,17 @@
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(80), unique=True, nullable=False)
password = db.Column(db.String(128), nullable=False) # hashed password storage
register_time = db.Column(db.DateTime, nullable=False)
class Finding(db.Model):
id = db.Column(db.Integer, primary_key=True)
title = db.Column(db.String(120), nullable=False)
path = db.Column(db.String(120), nullable=False) # Path on laminax.org
find_time = db.Column(db.DateTime, nullable=False)
found_by = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False)
content_preview = db.Column(db.Text, nullable=True) # Scraped preview of the finding