Initial commit: Homelab API

This commit is contained in:
Cosmo
2026-02-06 11:19:55 +00:00
commit 5a40127edd
26 changed files with 2807 additions and 0 deletions

32
internal/model/email.go Normal file
View File

@@ -0,0 +1,32 @@
package model
import (
"time"
)
type EmailToken struct {
ID int64 `db:"id" json:"id"`
UserID int64 `db:"user_id" json:"user_id"`
Token string `db:"token" json:"token"`
Type string `db:"type" json:"type"` // verification, reset
ExpiresAt time.Time `db:"expires_at" json:"expires_at"`
UsedAt *time.Time `db:"used_at" json:"used_at"`
CreatedAt time.Time `db:"created_at" json:"created_at"`
}
type ForgotPasswordRequest struct {
Email string `json:"email"`
}
type ResetPasswordRequest struct {
Token string `json:"token"`
NewPassword string `json:"new_password"`
}
type VerifyEmailRequest struct {
Token string `json:"token"`
}
type ResendVerificationRequest struct {
Email string `json:"email"`
}