added user signup feature

This commit is contained in:
2025-09-26 23:57:36 +02:00
parent 2f0a9b5127
commit 57355fe9ac
15 changed files with 242 additions and 14 deletions

View File

@@ -4,7 +4,7 @@ import "gorm.io/gorm"
type Book struct {
gorm.Model
Title string `json:"title"`
Title string `json:"title" gorm:"not null"`
Author string `json:"author"`
Rating int `json:"rating"`
Rating int `json:"rating"`
}

9
internal/model/user.go Normal file
View File

@@ -0,0 +1,9 @@
package model
import "gorm.io/gorm"
type User struct {
gorm.Model
Name string `gorm:"index;uniqueIndex"`
Password string
}