added user signup feature
This commit is contained in:
@@ -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
9
internal/model/user.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package model
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
type User struct {
|
||||
gorm.Model
|
||||
Name string `gorm:"index;uniqueIndex"`
|
||||
Password string
|
||||
}
|
||||
Reference in New Issue
Block a user