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

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

// UserLevelFlowColumns defines and stores column names for table c_user_level_flow.
type userLevelFlowColumns struct {
	Id            string // id
	UserId        string // 会员ID
	OldLevelId    string // 原级别
	NewLevelId    string // 新级别
	OldExpireDate string // 原有效期
	NewExpireDate string // 新有效期
	AdminName     string // 操作管理员名称
	Remark        string // 变更描述
	CreatedAt     string // 创建时间
}

func NewUserLevelFlowDao() *UserLevelFlowDao {
	return &UserLevelFlowDao{
		M:     g.DB("default").Model("c_user_level_flow").Safe(),
		DB:    g.DB("default"),
		Table: "c_user_level_flow",
		Columns: userLevelFlowColumns{
			Id:            "id",
			UserId:        "user_id",
			OldLevelId:    "old_level_id",
			NewLevelId:    "new_level_id",
			OldExpireDate: "old_expire_date",
			NewExpireDate: "new_expire_date",
			AdminName:     "admin_name",
			Remark:        "remark",
			CreatedAt:     "created_at",
		},
	}
}
