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

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

// ConversationMidjourneyColumns defines and stores column names for table c_conversation_midjourney.
type conversationMidjourneyColumns struct {
	ConversationId string // 对话id
	ActionType     string // 行为类型 1生图 2Upsale 3Variate 4Reroll
	FileId         string // 图片文件ID
	Components     string // 附加组件json 用于u,v,r等按钮及记录
	ErrorData      string // 错误信息
}

func NewConversationMidjourneyDao() *ConversationMidjourneyDao {
	return &ConversationMidjourneyDao{
		M:     g.DB("default").Model("c_conversation_midjourney").Safe(),
		DB:    g.DB("default"),
		Table: "c_conversation_midjourney",
		Columns: conversationMidjourneyColumns{
			ConversationId: "conversation_id",
			ActionType:     "action_type",
			FileId:         "file_id",
			Components:     "components",
			ErrorData:      "error_data",
		},
	}
}
