promote_train_record.go 799 B

12345678910111213141516171819202122232425262728
  1. package rag
  2. import (
  3. "eta/eta_api/global"
  4. "eta/eta_api/utils"
  5. "time"
  6. )
  7. type PromoteTrainRecord struct {
  8. Id int `gorm:"id;primaryKey"`
  9. Title string `gorm:"title"`
  10. WechatArticleId int `gorm:"wechat_article_id"`
  11. TemplatePromote string `gorm:"template_promote"`
  12. PromoteSendTime time.Time `gorm:"promote_send_time"`
  13. AigcContent string `gorm:"aigc_content"`
  14. AigcSendTime time.Time `gorm:"aigc_send_time"`
  15. IsDeleted bool `gorm:"is_deleted"`
  16. CreatedTime time.Time `gorm:"created_time"`
  17. UpdateTime time.Time `gorm:"update_time"`
  18. }
  19. func (p *PromoteTrainRecord) TableName() string {
  20. return "promote_train_record"
  21. }
  22. func (p *PromoteTrainRecord) SaveContent() error {
  23. return global.DbMap[utils.DbNameAI].Create(p).Error
  24. }