// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.

package model

import (
	"time"

	"gorm.io/gorm"
)

const TableNameUsageDetail = "usage_detail"

// UsageDetail mapped from table <usage_detail>
type UsageDetail struct {
	ID               int64          `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	CreatedAt        time.Time      `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:Create Time | 创建日期" json:"created_at"`                     // Create Time | 创建日期
	UpdatedAt        time.Time      `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP;comment:Update Time | 修改日期" json:"updated_at"`                     // Update Time | 修改日期
	Status           int64          `gorm:"column:status;not null;default:1;comment:状态 1 正常 2 禁用" json:"status"`                                                   // 状态 1 正常 2 禁用
	DeletedAt        gorm.DeletedAt `gorm:"column:deleted_at;comment:Delete Time | 删除日期" json:"deleted_at"`                                                        // Delete Time | 删除日期
	Type             int64          `gorm:"column:type;not null;default:1;comment:1 微信 2 名片" json:"type"`                                                          // 1 微信 2 名片
	BotID            string         `gorm:"column:bot_id;not null;comment:微信或名片id" json:"bot_id"`                                                                  // 微信或名片id
	ReceiverID       string         `gorm:"column:receiver_id;not null;comment:微信id或open_id" json:"receiver_id"`                                                   // 微信id或open_id
	App              int64          `gorm:"column:app;comment:1 cow-basic 2 cow-agent-优化 3 cow-agent 4 cow-sop-阶段 5cow-sop-节点 6 mp-card 7 mp-employee" json:"app"` // 1 cow-basic 2 cow-agent-优化 3 cow-agent 4 cow-sop-阶段 5cow-sop-节点 6 mp-card 7 mp-employee
	SessionID        int64          `gorm:"column:session_id;not null;comment:名片会话id" json:"session_id"`                                                           // 名片会话id
	Request          string         `gorm:"column:request;comment:请求内容" json:"request"`                                                                            // 请求内容
	Response         string         `gorm:"column:response;comment:响应内容" json:"response"`                                                                          // 响应内容
	OriginalData     string         `gorm:"column:original_data;comment:原始数据" json:"original_data"`                                                                // 原始数据
	TotalTokens      int64          `gorm:"column:total_tokens;not null;comment:使用token总数" json:"total_tokens"`                                                    // 使用token总数
	PromptTokens     int64          `gorm:"column:prompt_tokens;comment:请求token数" json:"prompt_tokens"`                                                            // 请求token数
	CompletionTokens int64          `gorm:"column:completion_tokens;comment:响应token数" json:"completion_tokens"`                                                    // 响应token数
	OrganizationID   int64          `gorm:"column:organization_id;not null;default:1;comment:机构 ID" json:"organization_id"`                                        // 机构 ID
}

// TableName UsageDetail's table name
func (*UsageDetail) TableName() string {
	return TableNameUsageDetail
}
