service.xpcool.com/internal/table/admin_menu.go

134 lines
2.6 KiB
Go

// =================================================================================
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// =================================================================================
package table
import (
"context"
"github.com/gogf/gf/v2/database/gdb"
)
// AdminMenu defines the fields of table "admin_menu" with their properties.
// This map is used internally by GoFrame ORM to understand table structure.
var AdminMenu = map[string]*gdb.TableField{
"id": {
Index: 0,
Name: "id",
Type: "bigint unsigned",
Null: false,
Key: "PRI",
Default: nil,
Extra: "auto_increment",
Comment: "",
},
"parent_id": {
Index: 1,
Name: "parent_id",
Type: "bigint unsigned",
Null: false,
Key: "MUL",
Default: "0",
Extra: "",
Comment: "",
},
"name": {
Index: 2,
Name: "name",
Type: "varchar(64)",
Null: false,
Key: "",
Default: nil,
Extra: "",
Comment: "",
},
"type": {
Index: 3,
Name: "type",
Type: "tinyint",
Null: false,
Key: "",
Default: nil,
Extra: "",
Comment: "1 menu,2 api",
},
"path": {
Index: 4,
Name: "path",
Type: "varchar(255)",
Null: false,
Key: "",
Default: "",
Extra: "",
Comment: "",
},
"permission": {
Index: 5,
Name: "permission",
Type: "varchar(128)",
Null: false,
Key: "UNI",
Default: "",
Extra: "",
Comment: "",
},
"sort": {
Index: 6,
Name: "sort",
Type: "int",
Null: false,
Key: "",
Default: "0",
Extra: "",
Comment: "",
},
"status": {
Index: 7,
Name: "status",
Type: "tinyint",
Null: false,
Key: "",
Default: "1",
Extra: "",
Comment: "",
},
"created_at": {
Index: 8,
Name: "created_at",
Type: "datetime",
Null: false,
Key: "",
Default: nil,
Extra: "",
Comment: "",
},
"updated_at": {
Index: 9,
Name: "updated_at",
Type: "datetime",
Null: false,
Key: "",
Default: nil,
Extra: "",
Comment: "",
},
"deleted_at": {
Index: 10,
Name: "deleted_at",
Type: "datetime",
Null: true,
Key: "MUL",
Default: nil,
Extra: "",
Comment: "",
},
}
// SetAdminMenuTableFields registers the table fields definition to the database instance.
// db: database instance that implements gdb.DB interface.
// schema: optional schema/namespace name, especially for databases that support schemas.
func SetAdminMenuTableFields(ctx context.Context, db gdb.DB, schema ...string) error {
return db.GetCore().SetTableFields(ctx, "admin_menu", AdminMenu, schema...)
}