diff options
| author | Bobby <[email protected]> | 2026-01-20 13:35:01 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2026-01-20 13:35:01 +0530 |
| commit | 61d5f45189a40621bceeb14c6646031dd15ab6c2 (patch) | |
| tree | 602c98f87d776a9088723ee3d5a27e61053cbc08 /models/user.go | |
| parent | c8d0bbb5b54f5cec3ebb245f9a21d8a94b3bd944 (diff) | |
| download | cafe-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.go | 12 |
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"` +} |
