123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- package models
- import (
- "eta/eta_api/global"
- "eta/eta_api/utils"
- "time"
- )
- type RaiReportNotifyRedis struct {
- ArticleId int `description:"文章ID"`
- Action string `description:"日志类型:add,edit,move"`
- CreateTime time.Time `description:"创建时间"`
- }
- type ArticleDetailResultApi struct {
- Data ArticleResultApidate `json:"data"`
- Code int `json:"code"`
- Msg string `json:"msg"`
- }
- type ArticleResultApidate struct {
- ArticleId int `json:"id"`
- Title string `json:"title"`
- File string `json:"file"`
- TitleEn string `json:"title_en"`
- Frequency string `json:"frequency"`
- CreateDate string `json:"create_date"`
- UpdateDate string `json:"update_date"`
- PublishDate time.Time `json:"publish_date"`
- PublishStatus int `json:"publish_status" description:"发布状态: 0未发布,2已发布,4已发布"`
- IndustrId int `json:"industry_id"`
- SeriesId int `json:"series_id"`
- Series ArticleSeries `json:"series"`
- Content ArticleResultApiContent `json:"content"`
- Author ArticleResultApiAuthor `json:"author"`
- Industry ArticleResultApiIndustry `json:"industry"`
- Type ArticleResultApiType `json:"type"`
- Stock []string `json:"stock"`
- Field ArticleField `json:"field"`
- Corpus Corpus `json:"corpus"`
- Cover string `json:"cover"`
- TypeId int `json:"type_id"`
- IsActive bool `json:"is_active" description:"是否有效: 0无效,1有效"`
- PublishArea string `json:"publish_area"`
- }
- type ArticleField struct {
- Id int `json:"id"`
- Name string `json:"name"`
- Description string `json:"description"`
- IndustryId int `json:"industry_id"`
- }
- type Corpus struct {
- Id int `json:"id"`
- ArticleId int `json:"article_id"`
- Corpus string `json:"corpus"`
- }
- type ArticleSeries struct {
- Name string `json:"name"`
- }
- type ArticleResultApiContent struct {
- ArticleId int `json:"id"`
- Body string `json:"body"`
- Abstract string `json:"abstract"`
- Annotation string `json:"annotation"`
- }
- type ArticleResultApiAuthor struct {
- PhoneNumber string `json:"phone_number"`
- Name string `json:"name"`
- }
- type ArticleResultApiIndustry struct {
- Name string `json:"name"`
- }
- type ArticleResultApiType struct {
- Name string `json:"name"`
- }
- type ArticleIndustryApi struct {
- Data []ArticleResultApiIndustrdate `json:"data"`
- Code int `json:"code"`
- Msg string `json:"msg"`
- }
- type ArticleResultApiIndustrdate struct {
- Id int `json:"id"`
- Name string `json:"name"`
- Series []ArticleResultApiSeriesdate `json:"series"`
- }
- type ArticleResultApiSeriesdate struct {
- Id int `json:"id"`
- Name string `json:"name"`
- }
- func GetReportByRaiReportId(raiReportId int) (report *Report, err error) {
- report = new(Report)
- err = global.DbMap[utils.DbNameReport].Model(&Report{}).Where("rai_report_id = ?", raiReportId).First(report).Error
- return
- }
|