message_records.gen.go 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 TableNameMessageRecord = "message_records"
  10. // MessageRecord mapped from table <message_records>
  11. type MessageRecord 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;default:1;comment:发送状态:1 未发送 2 发送中 3 发送成功 4 发送失败 ….(待定)" json:"status"` // 发送状态:1 未发送 2 发送中 3 发送成功 4 发送失败 ….(待定)
  16. DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;comment:Delete Time | 删除日期" json:"deleted_at"` // Delete Time | 删除日期
  17. BotWxid string `gorm:"column:bot_wxid;comment:机器人微信 id" json:"bot_wxid"` // 机器人微信 id
  18. ContactID int64 `gorm:"column:contact_id;comment:联系人 id" json:"contact_id"` // 联系人 id
  19. ContactType int64 `gorm:"column:contact_type;comment:类型:1好友,2群组,3企业微信联系人" json:"contact_type"` // 类型:1好友,2群组,3企业微信联系人
  20. ContactWxid string `gorm:"column:contact_wxid;comment:接收方微信 id" json:"contact_wxid"` // 接收方微信 id
  21. ContentType int64 `gorm:"column:content_type;comment:内容类型 1 文本 2 文件" json:"content_type"` // 内容类型 1 文本 2 文件
  22. Content string `gorm:"column:content;comment:发送内容" json:"content"` // 发送内容
  23. Meta string `gorm:"column:meta;comment:元数据(如文件名)" json:"meta"` // 元数据(如文件名)
  24. ErrorDetail string `gorm:"column:error_detail;comment:异常原因" json:"error_detail"` // 异常原因
  25. SendTime time.Time `gorm:"column:send_time;comment:发送时间" json:"send_time"` // 发送时间
  26. SourceType int64 `gorm:"column:source_type;comment:源类型 1 点发 2 群发 3 SOP 阶段 4 SOP 节点" json:"source_type"` // 源类型 1 点发 2 群发 3 SOP 阶段 4 SOP 节点
  27. SourceID int64 `gorm:"column:source_id;comment:源 ID" json:"source_id"` // 源 ID
  28. SubSourceID int64 `gorm:"column:sub_source_id;comment:次源 ID" json:"sub_source_id"` // 次源 ID
  29. OrganizationID int64 `gorm:"column:organization_id;default:1;comment:机构 ID" json:"organization_id"` // 机构 ID
  30. }
  31. // TableName MessageRecord's table name
  32. func (*MessageRecord) TableName() string {
  33. return TableNameMessageRecord
  34. }