first commit

This commit is contained in:
Adrian Zürcher
2025-10-24 10:31:19 +02:00
commit 4db4262195
17 changed files with 1937 additions and 0 deletions

14
models/user.go Normal file
View File

@@ -0,0 +1,14 @@
package models
type User struct {
Id uint `gorm:"primaryKey" json:"id"`
Name string `gorm:"column:user_name" json:"user"`
Email string `gorm:"column:email" json:"email"`
Role string `gorm:"column:role" json:"role"`
Password string `gorm:"column:password" json:"password"`
Settings Settings `gorm:"type:json" json:"settings"`
}
func (u *User) IsValid() bool {
return u.Name != ""
}