const db = require('../database'); const User = { create: (username, password, role = 'user', callback) => { const sql = `INSERT INTO users (username, password, role) VALUES (?, ?, ?)`; db.query(sql, [username, password, role], callback); }, findByUsername: (username, callback) => { db.query('SELECT * FROM users WHERE username = ?', [username], callback); } }; module.exports = User;