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

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

// WalletColumns defines and stores column names for table c_wallet.
type walletColumns struct {
	UserId     string // 会员ID
	Balance    string // 余额
	Gpt3       string // gpt3提问次数
	Gpt4       string // gpt4提问次数
	Midjourney string // midjourney提问次数
}

func NewWalletDao() *WalletDao {
	return &WalletDao{
		M:     g.DB("default").Model("c_wallet").Safe(),
		DB:    g.DB("default"),
		Table: "c_wallet",
		Columns: walletColumns{
			UserId:     "user_id",
			Balance:    "balance",
			Gpt3:       "gpt3",
			Gpt4:       "gpt4",
			Midjourney: "midjourney",
		},
	}
}
