registering user works
This commit is contained in:
parent
faf460470e
commit
acdee880e4
4 changed files with 48 additions and 32 deletions
|
@ -1,6 +1,8 @@
|
|||
package database
|
||||
|
||||
import "gorm.io/gorm"
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type Database struct {
|
||||
ORM *gorm.DB
|
||||
|
@ -8,7 +10,7 @@ type Database struct {
|
|||
}
|
||||
|
||||
type User struct {
|
||||
ID int
|
||||
Username string
|
||||
Password string
|
||||
Username string `gorm:"primaryKey"`
|
||||
Password string
|
||||
CreatedAt int64 `gorm:"autoCreateTime"`
|
||||
}
|
||||
|
|
Reference in a new issue