initial setup

This commit is contained in:
2026-05-30 14:15:50 -05:00
parent b9991e907d
commit 686f54af64
5 changed files with 64 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
package db
import (
"time"
"gorm.io/gorm"
)
type Base struct {
ID uint `gorm:"primarykey"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"index"`
}
+27
View File
@@ -0,0 +1,27 @@
package db
type UserStatus uint8
const (
UserStatusPending UserStatus = iota
UserStatusActive
UserStatusSuspended
UserStatusInactive
)
type User struct {
Base
Name string
Email string
PasswordHash string
Roles []Role `gorm:"many2many:user_roles"`
}
type Role struct {
Base
Name string
Domain string
Description string
}