67 lines
1.2 KiB
Go
67 lines
1.2 KiB
Go
// 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"`
|
|
}
|
|
|
|
func (e *PasswordToken) GetName() string {
|
|
return NamePasswordToken
|
|
}
|
|
|
|
func (e *PasswordToken) GetSchema() []*FieldSchema {
|
|
return fieldsPasswordToken
|
|
}
|
|
|
|
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"`
|
|
}
|
|
|
|
func (e *User) GetName() string {
|
|
return NameUser
|
|
}
|
|
|
|
func (e *User) GetSchema() []*FieldSchema {
|
|
return fieldsUser
|
|
}
|
|
|
|
type EntityType interface {
|
|
GetName() string
|
|
GetSchema() []*FieldSchema
|
|
}
|
|
|
|
var entityTypes = []EntityType{
|
|
&PasswordToken{},
|
|
&User{},
|
|
}
|
|
|
|
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 GetEntityTypes() []EntityType {
|
|
return entityTypes
|
|
}
|