User-Panel gebaut

This commit is contained in:
Jason Hirsch
2025-02-16 21:47:35 +01:00
parent 835de6fbf9
commit c17d39df24
280 changed files with 19492 additions and 0 deletions

24
Dashboard/database.py Normal file
View File

@@ -0,0 +1,24 @@
import sqlite3
import bcrypt
DATABASE = "clickcandit.db"
def init_db():
conn = sqlite3.connect(DATABASE)
c = conn.cursor()
c.execute("""
CREATE TABLE IF NOT EXISTS users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
email TEXT UNIQUE NOT NULL,
password TEXT NOT NULL,
role TEXT DEFAULT 'user',
reset_token TEXT DEFAULT NULL
)
""")
conn.commit()
conn.close()
if __name__ == "__main__":
init_db()
print("Datenbank initialisiert!")