add init functions

This commit is contained in:
2025-12-19 14:26:28 +02:00
parent c0a187d461
commit cd465d42a3
6 changed files with 81 additions and 1 deletions

View File

@@ -1,11 +1,15 @@
package user
import "gorm.io/gorm"
import (
"git.oblat.lv/alex/triggerssmith/internal/acl"
"gorm.io/gorm"
)
type User struct {
ID int64 `gorm:"primaryKey"`
Username string `gorm:"uniqueIndex;not null"`
Email string `gorm:"uniqueIndex;not null"`
Password string `gorm:"not null"`
Roles []acl.Role `gorm:"many2many:user_roles"`
DeletedAt gorm.DeletedAt `gorm:"index"`
}