add: db user type + gorm deps

This commit is contained in:
hexlocation 2025-05-05 15:18:41 +02:00
parent 69e3133563
commit fe1ebcd711
3 changed files with 86 additions and 0 deletions

View file

@ -1,7 +1,10 @@
package types
import (
"time"
"github.com/gin-gonic/gin"
"gorm.io/gorm"
)
type Route struct {
@ -15,6 +18,15 @@ type StereoConfig struct {
ImagePath string
}
type User struct {
gorm.Model
ID uint
Username string
RegistrationDate time.Time
Blacklisted bool
Email string
}
func RegisterRoutes(groupName string, routes []Route, cfg *StereoConfig) {
group := cfg.Router.Group(groupName)