usage_detail.gen.go 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Code generated by gorm.io/gen. DO NOT EDIT.
  2. // Code generated by gorm.io/gen. DO NOT EDIT.
  3. // Code generated by gorm.io/gen. DO NOT EDIT.
  4. package model
  5. import (
  6. "time"
  7. "gorm.io/gorm"
  8. )
  9. const TableNameUsageDetail = "usage_detail"
  10. // UsageDetail mapped from table <usage_detail>
  11. type UsageDetail struct {
  12. ID int64 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
  13. CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:Create Time | 创建日期" json:"created_at"` // Create Time | 创建日期
  14. UpdatedAt time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP;comment:Update Time | 修改日期" json:"updated_at"` // Update Time | 修改日期
  15. Status int64 `gorm:"column:status;not null;default:1;comment:状态 1 正常 2 禁用" json:"status"` // 状态 1 正常 2 禁用
  16. DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;comment:Delete Time | 删除日期" json:"deleted_at"` // Delete Time | 删除日期
  17. Type int64 `gorm:"column:type;not null;default:1;comment:1 微信 2 名片" json:"type"` // 1 微信 2 名片
  18. BotID string `gorm:"column:bot_id;not null;comment:微信或名片id" json:"bot_id"` // 微信或名片id
  19. ReceiverID string `gorm:"column:receiver_id;not null;comment:微信id或open_id" json:"receiver_id"` // 微信id或open_id
  20. 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
  21. SessionID int64 `gorm:"column:session_id;not null;comment:名片会话id" json:"session_id"` // 名片会话id
  22. Request string `gorm:"column:request;comment:请求内容" json:"request"` // 请求内容
  23. Response string `gorm:"column:response;comment:响应内容" json:"response"` // 响应内容
  24. OriginalData string `gorm:"column:original_data;comment:原始数据" json:"original_data"` // 原始数据
  25. TotalTokens int64 `gorm:"column:total_tokens;not null;comment:使用token总数" json:"total_tokens"` // 使用token总数
  26. PromptTokens int64 `gorm:"column:prompt_tokens;comment:请求token数" json:"prompt_tokens"` // 请求token数
  27. CompletionTokens int64 `gorm:"column:completion_tokens;comment:响应token数" json:"completion_tokens"` // 响应token数
  28. OrganizationID int64 `gorm:"column:organization_id;not null;default:1;comment:机构 ID" json:"organization_id"` // 机构 ID
  29. }
  30. // TableName UsageDetail's table name
  31. func (*UsageDetail) TableName() string {
  32. return TableNameUsageDetail
  33. }