// ================================================================================= // 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" ) // AdminOperationLog defines the fields of table "admin_operation_log" with their properties. // This map is used internally by GoFrame ORM to understand table structure. var AdminOperationLog = map[string]*gdb.TableField{ "id": { Index: 0, Name: "id", Type: "bigint unsigned", Null: false, Key: "PRI", Default: nil, Extra: "auto_increment", Comment: "", }, "admin_user_id": { Index: 1, Name: "admin_user_id", Type: "bigint unsigned", Null: false, Key: "MUL", Default: nil, Extra: "", Comment: "", }, "permission": { Index: 2, Name: "permission", Type: "varchar(128)", Null: false, Key: "MUL", Default: "", Extra: "", Comment: "", }, "method": { Index: 3, Name: "method", Type: "varchar(12)", Null: false, Key: "", Default: nil, Extra: "", Comment: "", }, "path": { Index: 4, Name: "path", Type: "varchar(255)", Null: false, Key: "", Default: nil, Extra: "", Comment: "", }, "ip": { Index: 5, Name: "ip", Type: "varchar(64)", Null: false, Key: "", Default: "", Extra: "", Comment: "", }, "request_param": { Index: 6, Name: "request_param", Type: "json", Null: true, Key: "", Default: nil, Extra: "", Comment: "", }, "duration_ms": { Index: 7, Name: "duration_ms", Type: "int unsigned", Null: false, Key: "", Default: "0", Extra: "", Comment: "", }, "status_code": { Index: 8, Name: "status_code", Type: "int", Null: false, Key: "", Default: "0", Extra: "", Comment: "", }, "created_at": { Index: 9, Name: "created_at", Type: "datetime", Null: false, Key: "", Default: nil, Extra: "", Comment: "", }, "updated_at": { Index: 10, Name: "updated_at", Type: "datetime", Null: false, Key: "", Default: nil, Extra: "", Comment: "", }, "deleted_at": { Index: 11, Name: "deleted_at", Type: "datetime", Null: true, Key: "MUL", Default: nil, Extra: "", Comment: "", }, } // SetAdminOperationLogTableFields 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 SetAdminOperationLogTableFields(ctx context.Context, db gdb.DB, schema ...string) error { return db.GetCore().SetTableFields(ctx, "admin_operation_log", AdminOperationLog, schema...) }