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

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

// ShopGoodsColumns defines and stores column names for table c_shop_goods.
type shopGoodsColumns struct {
	Id                string // ID
	Title             string // 商品标题
	Content           string // 商品内容
	FeatItems         string // 商品特色条目JSON
	BuyType           string // 购买类型 1购买级别 2购买balance 3购买gpt3 4购买gpt4 5购买midjourney
	ActiveLevelId     string // 购买的级别
	ActiveExpireType  string // 激活有效期类型 0无 1一天 2一月 3一年
	ActiveExpireValue string // 激活有效期值
	BuyValue          string // 购买的提问次数的值分单位
	MarketPrice       string // 市场价
	RealPrice         string // 实际价格
	Status            string // 是否上架
	Sort              string // 排序
	CreatedAt         string // 创建时间
	UpdatedAt         string // 更新时间
}

func NewShopGoodsDao() *ShopGoodsDao {
	return &ShopGoodsDao{
		M:     g.DB("default").Model("c_shop_goods").Safe(),
		DB:    g.DB("default"),
		Table: "c_shop_goods",
		Columns: shopGoodsColumns{
			Id:                "id",
			Title:             "title",
			Content:           "content",
			FeatItems:         "feat_items",
			BuyType:           "buy_type",
			ActiveLevelId:     "active_level_id",
			ActiveExpireType:  "active_expire_type",
			ActiveExpireValue: "active_expire_value",
			BuyValue:          "buy_value",
			MarketPrice:       "market_price",
			RealPrice:         "real_price",
			Status:            "status",
			Sort:              "sort",
			CreatedAt:         "created_at",
			UpdatedAt:         "updated_at",
		},
	}
}
