// Copyright 2023 Anlity <leo@leocode.net>. All rights reserved.
// Use of this source code is governed by a AGPL v3.0 style
// license that can be found in the LICENSE file.

// ==========================================================================
// This is auto-generated by gf cli tool. DO NOT EDIT THIS FILE MANUALLY.
// ==========================================================================

package internal

import (
	"github.com/gogf/gf/database/gdb"
	"github.com/gogf/gf/frame/g"
	"github.com/gogf/gf/frame/gmvc"
)

// LogOperationDao is the manager for logic model data accessing
// and custom defined data operations functions management.
type LogOperationDao struct {
	gmvc.M                      // M is the core and embedded struct that inherits all chaining operations from gdb.Model.
	DB      gdb.DB              // DB is the raw underlying database management object.
	Table   string              // Table is the table name of the DAO.
	Columns logOperationColumns // Columns contains all the columns of Table that for convenient usage.
}

// LogOperationColumns defines and stores column names for table c_log_operation.
type logOperationColumns struct {
	Id            string // ID
	StatusCode    string // 状态码
	Router        string // 请求路径
	RequestHeader string // 请求头
	Content       string // 操作内容
	AdminName     string // 管理员名
	CreatedAt     string // 创建时间
}

func NewLogOperationDao() *LogOperationDao {
	return &LogOperationDao{
		M:     g.DB("default").Model("c_log_operation").Safe(),
		DB:    g.DB("default"),
		Table: "c_log_operation",
		Columns: logOperationColumns{
			Id:            "id",
			StatusCode:    "status_code",
			Router:        "router",
			RequestHeader: "request_header",
			Content:       "content",
			AdminName:     "admin_name",
			CreatedAt:     "created_at",
		},
	}
}
