summaryrefslogtreecommitdiff
path: root/models/user.go
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-01-20 13:35:01 +0530
committerBobby <[email protected]>2026-01-20 13:35:01 +0530
commit61d5f45189a40621bceeb14c6646031dd15ab6c2 (patch)
tree602c98f87d776a9088723ee3d5a27e61053cbc08 /models/user.go
parentc8d0bbb5b54f5cec3ebb245f9a21d8a94b3bd944 (diff)
downloadcafe-61d5f45189a40621bceeb14c6646031dd15ab6c2.tar.xz
cafe-61d5f45189a40621bceeb14c6646031dd15ab6c2.zip
Implement database configuration and management with PostgreSQL support
Diffstat (limited to 'models/user.go')
-rw-r--r--models/user.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/models/user.go b/models/user.go
new file mode 100644
index 0000000..d51d5a4
--- /dev/null
+++ b/models/user.go
@@ -0,0 +1,12 @@
+package models
+
+import "gorm.io/gorm"
+
+type User struct {
+ gorm.Model
+ OpenID string `gorm:"uniqueIndex;not null"`
+ Username string `gorm:"uniqueIndex;not null"`
+ Email string `gorm:"uniqueIndex;not null"`
+ DisplayName string
+ IsAdmin bool `gorm:"default:false"`
+}