fixed relationship issues

This commit is contained in:
2026-02-05 00:10:10 +11:00
parent 6a058ab636
commit 59ee880b63
22 changed files with 236 additions and 254 deletions

View File

@@ -20,6 +20,8 @@ type Permission struct {
Action string `bun:"action,notnull"`
IsSystem bool `bun:"is_system,default:false"`
CreatedAt int64 `bun:"created_at,notnull"`
Roles []Role `bun:"m2m:role_permissions,join:Permission=Role"`
}
// GetPermissionByName queries the database for a permission matching the given name