diff --git a/Lab01/app/.idea/saveactions_settings.xml b/Lab01/app/.idea/saveactions_settings.xml
new file mode 100644
index 0000000..66129c1
--- /dev/null
+++ b/Lab01/app/.idea/saveactions_settings.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Lab01/app/database/types.go b/Lab01/app/database/types.go
index a0078b8..d4e11f0 100644
--- a/Lab01/app/database/types.go
+++ b/Lab01/app/database/types.go
@@ -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"`
}
diff --git a/Lab01/app/templates/register.tmpl b/Lab01/app/templates/register.tmpl
index b64084b..3f1632f 100644
--- a/Lab01/app/templates/register.tmpl
+++ b/Lab01/app/templates/register.tmpl
@@ -9,37 +9,37 @@
{{template "navbar" .}}
-
+
+
+
+
The username needs to be unique
+
+
+
+
+
The password needs to be different from the username
+
+
-
+