package models import ( "database/sql" "time" ) type User struct { ID int Username string Email string HashedPassword []byte Created time.Time } type UserModel struct { DB *sql.DB } // Insert func (m *UserModel) Insert(username, email, password string) (int, error) { // stmt := `INSERT INTO users (username, email, password, created) // VALUES(?, ?, ?, UTC_TIMESTAMP())` // result, err := m.DB.Exec(stmt, username, email, password) // if err != nil { // return 0, err // } // id, err := result.LastInsertId() // if err != nil { // return 0, err // } return 0, nil } // Authenticate func (m *UserModel) Authenticate(email int, password string) (int, error) { return 0, nil } // Exists func (m *UserModel) Exists(id int) (bool, error) { return false, nil }