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

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

// FileMidjourneyColumns defines and stores column names for table c_file_midjourney.
type fileMidjourneyColumns struct {
	Id         string // id
	UserId     string // 会员id
	QueueId    string // 生成该图片的队列id
	FileName   string // 文件名
	Path       string // 本地储存路径
	Thumbnail  string // 缩略图的本地保存路径
	Prompt     string // 生成该图片的提示词
	MjFileName string // midjourney的文件名
	MjUrl      string // midjourney的路径
	Width      string // 宽
	Height     string // 高
	Size       string // 大小
	CreatedAt  string // 创建时间
}

func NewFileMidjourneyDao() *FileMidjourneyDao {
	return &FileMidjourneyDao{
		M:     g.DB("default").Model("c_file_midjourney").Safe(),
		DB:    g.DB("default"),
		Table: "c_file_midjourney",
		Columns: fileMidjourneyColumns{
			Id:         "id",
			UserId:     "user_id",
			QueueId:    "queue_id",
			FileName:   "file_name",
			Path:       "path",
			Thumbnail:  "thumbnail",
			Prompt:     "prompt",
			MjFileName: "mj_file_name",
			MjUrl:      "mj_url",
			Width:      "width",
			Height:     "height",
			Size:       "size",
			CreatedAt:  "created_at",
		},
	}
}
