tables.go 664 B

1234567891011121314151617181920212223
  1. package tables
  2. import "github.com/GoAdminGroup/go-admin/plugins/admin/modules/table"
  3. // generators is a map of table models.
  4. //
  5. // The key of generators is the prefix of table info url.
  6. // The corresponding value is the Form and TableName data.
  7. //
  8. // http://{{config.Domain}}:{{Port}}/{{config.Prefix}}/info/{{key}}
  9. //
  10. // example:
  11. //
  12. // "users" => http://localhost:9033/admin/info/users
  13. // "posts" => http://localhost:9033/admin/info/posts
  14. // "authors" => http://localhost:9033/admin/info/authors
  15. //
  16. var Generators = map[string]table.Generator{
  17. "posts": GetPostsTable,
  18. "users": GetUserTable,
  19. "authors": GetAuthorsTable,
  20. "profile": GetProfileTable,
  21. }