Add dynamic admin panel for managing entities (#108)

This commit is contained in:
Mike Stefanello 2025-04-22 08:26:35 -04:00 committed by GitHub
parent 60009df0bf
commit 1a6874fd82
47 changed files with 2173 additions and 320 deletions

44
ent/admin/types.go Normal file
View file

@ -0,0 +1,44 @@
// Code generated by ent, DO NOT EDIT.
package admin
import "time"
type PasswordToken struct {
Token *string `form:"token"`
UserID int `form:"user_id"`
CreatedAt *time.Time `form:"created_at"`
}
type User struct {
Name string `form:"name"`
Email string `form:"email"`
Password *string `form:"password"`
Verified bool `form:"verified"`
Admin bool `form:"admin"`
CreatedAt *time.Time `form:"created_at"`
}
type EntityList struct {
Columns []string
Entities []EntityValues
Page int
HasNextPage bool
}
type EntityValues struct {
ID int
Values []string
}
type HandlerConfig struct {
ItemsPerPage int
PageQueryKey string
TimeFormat string
}
func GetEntityTypeNames() []string {
return []string{
"PasswordToken",
"User",
}
}