// 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"
)

// AdminRoleDao is the manager for logic model data accessing
// and custom defined data operations functions management.
type AdminRoleDao 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 adminRoleColumns // Columns contains all the columns of Table that for convenient usage.
}

// AdminRoleColumns defines and stores column names for table c_admin_role.
type adminRoleColumns struct {
	Id               string //
	RoleName         string // 角色名
	Remark           string // 备注
	Permission       string // 权限
	ColumnPermission string // 字段权限
	DontDel          string // 不允许删除
	CreateAdmin      string // 创建管理员ID
	UpdateAdmin      string // 更新管理员ID
	CreatedAt        string // 创建时间
	UpdatedAt        string // 更新时间
}

func NewAdminRoleDao() *AdminRoleDao {
	return &AdminRoleDao{
		M:     g.DB("default").Model("c_admin_role").Safe(),
		DB:    g.DB("default"),
		Table: "c_admin_role",
		Columns: adminRoleColumns{
			Id:               "id",
			RoleName:         "role_name",
			Remark:           "remark",
			Permission:       "permission",
			ColumnPermission: "column_permission",
			DontDel:          "dont_del",
			CreateAdmin:      "create_admin",
			UpdateAdmin:      "update_admin",
			CreatedAt:        "created_at",
			UpdatedAt:        "updated_at",
		},
	}
}
