report_chapter.go 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package eta
  2. import (
  3. "database/sql"
  4. "time"
  5. )
  6. type ReportChapter struct {
  7. ReportChapterId int32 `gorm:"column:report_chapter_id;primary_key;AUTO_INCREMENT;NOT NULL"`
  8. ReportId int32 `gorm:"column:report_id;default:0;NOT NULL;comment:'报告ID'"`
  9. ReportCode string `gorm:"column:report_code;default:;NOT NULL;comment:'报告唯一编码'"`
  10. ReportType string `gorm:"column:report_type;default:;NOT NULL;comment:'晨报-day; 周报-week;'"`
  11. ClassifyIdFirst int32 `gorm:"column:classify_id_first;default:0;comment:'一级分类id'"`
  12. ClassifyNameFirst string `gorm:"column:classify_name_first;default:;comment:'一级分类名称'"`
  13. TypeId int32 `gorm:"column:type_id;default:0;NOT NULL;comment:'品种ID'"`
  14. TypeName string `gorm:"column:type_name;default:;NOT NULL;comment:'品种名称'"`
  15. Title string `gorm:"column:title;default:;NOT NULL;comment:'章节标题'"`
  16. Abstract string `gorm:"column:abstract;default:;NOT NULL;comment:'摘要'"`
  17. AddType int8 `gorm:"column:add_type;default:0;NOT NULL;comment:'是否为继承报告 1-空白报告 2-继承报告'"`
  18. Author string `gorm:"column:author;default:;NOT NULL;comment:'作者'"`
  19. Content sql.NullString `gorm:"column:content;comment:'内容'"`
  20. ContentSub sql.NullString `gorm:"column:content_sub;comment:'内容前两个章节'"`
  21. Stage int32 `gorm:"column:stage;default:0;NOT NULL;comment:'期数'"`
  22. Trend string `gorm:"column:trend;default:;NOT NULL;comment:'趋势观点'"`
  23. Sort int32 `gorm:"column:sort;default:0;NOT NULL;comment:'排序: 数值越小越靠前'"`
  24. IsEdit int8 `gorm:"column:is_edit;default:0;NOT NULL;comment:'是否编辑过 0-未编辑 1-已编辑'"`
  25. PublishState int8 `gorm:"column:publish_state;default:0;NOT NULL;comment:'发布状态 1-待发布 2-已发布'"`
  26. PublishTime time.Time `gorm:"column:publish_time;default:NULL;comment:'发布时间'"`
  27. VideoUrl string `gorm:"column:video_url;default:;NOT NULL;comment:'音频文件URL'"`
  28. VideoName string `gorm:"column:video_name;default:;NOT NULL;comment:'音频文件名称'"`
  29. VideoPlaySeconds string `gorm:"column:video_play_seconds;default:;NOT NULL;comment:'音频播放时长'"`
  30. VideoSize string `gorm:"column:video_size;default:;NOT NULL;comment:'音频文件大小,单位M'"`
  31. VideoKind int8 `gorm:"column:video_kind;default:0;comment:'音频生成方式:1,手动上传,2:自动生成'"`
  32. CreateTime time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP;comment:'创建时间'"`
  33. ModifyTime time.Time `gorm:"column:modify_time;default:CURRENT_TIMESTAMP;comment:'修改时间'"`
  34. OriginalVideoUrl string `gorm:"column:original_video_url;default:;comment:'原始音频文件URL'"`
  35. ContentCode string `gorm:"column:content_code;default:NULL;comment:'文本内容唯一标识'"`
  36. }
  37. func (r *ReportChapter) TableName() string {
  38. return "report_chapter"
  39. }