Updated owner management

This commit is contained in:
HugeFrog24
2024-10-22 14:54:39 +02:00
parent aca2008404
commit 972973633a
5 changed files with 145 additions and 9 deletions

View File

@@ -61,3 +61,8 @@ type User struct {
Role Role `gorm:"foreignKey:RoleID"`
IsOwner bool `gorm:"default:false"` // Indicates if the user is the owner
}
// Compound unique index to ensure only one owner per bot
func (User) TableName() string {
return "users"
}