report_state_record.go 714 B

123456789101112131415161718192021222324252627
  1. package models
  2. import (
  3. "eta/eta_api/global"
  4. "eta/eta_api/utils"
  5. "time"
  6. )
  7. type ReportStateRecord struct {
  8. Id int `gorm:"column:id;primaryKey;autoIncrement" description:"Id"`
  9. ReportId int // 研报id
  10. ReportType int // 报告类型'报告类型:1中文研报2智能研报'
  11. State int // 状态:1-未提交 2-待审核 3-驳回 4-审核
  12. AdminId int // 操作人id
  13. AdminName string // 操作人姓名
  14. CreateTime time.Time // 创建时间
  15. }
  16. func AddReportStateRecord(item *ReportStateRecord) (lastId int64, err error) {
  17. o := global.DbMap[utils.DbNameReport]
  18. err = o.Create(item).Error
  19. if err != nil {
  20. return
  21. }
  22. lastId = int64(item.Id)
  23. return
  24. }