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

84 lines
1.9 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"
)
// AdminRoleMenu defines the fields of table "admin_role_menu" with their properties.
// This map is used internally by GoFrame ORM to understand table structure.
var AdminRoleMenu = map[string]*gdb.TableField{
"id": {
Index: 0,
Name: "id",
Type: "bigint unsigned",
Null: false,
Key: "PRI",
Default: nil,
Extra: "auto_increment",
Comment: "",
},
"role_id": {
Index: 1,
Name: "role_id",
Type: "bigint unsigned",
Null: false,
Key: "MUL",
Default: nil,
Extra: "",
Comment: "",
},
"menu_id": {
Index: 2,
Name: "menu_id",
Type: "bigint unsigned",
Null: false,
Key: "MUL",
Default: nil,
Extra: "",
Comment: "",
},
"created_at": {
Index: 3,
Name: "created_at",
Type: "datetime",
Null: false,
Key: "",
Default: nil,
Extra: "",
Comment: "",
},
"updated_at": {
Index: 4,
Name: "updated_at",
Type: "datetime",
Null: false,
Key: "",
Default: nil,
Extra: "",
Comment: "",
},
"deleted_at": {
Index: 5,
Name: "deleted_at",
Type: "datetime",
Null: true,
Key: "MUL",
Default: nil,
Extra: "",
Comment: "",
},
}
// SetAdminRoleMenuTableFields 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 SetAdminRoleMenuTableFields(ctx context.Context, db gdb.DB, schema ...string) error {
return db.GetCore().SetTableFields(ctx, "admin_role_menu", AdminRoleMenu, schema...)
}