zhangqian
2023-08-17 b654a22b6d2e579cf32e1d70f7a8a7791a501e81
model/severity.go
@@ -12,18 +12,18 @@
   // Severity 严重程度
   Severity struct {
      Id   int    `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
      Name   string    `json:"name" gorm:"column:name"`
      Name string `json:"name" gorm:"column:name"`
   }
   // SeveritySearch 严重程度搜索条件
   SeveritySearch struct {
      Severity
      Orm *gorm.DB
        QueryClass  constvar.SeverityQueryClass
        KeywordType constvar.SeverityKeywordType
        Keyword     string
        PageNum  int
        PageSize int
      Orm         *gorm.DB
      QueryClass  constvar.SeverityQueryClass
      KeywordType constvar.SeverityKeywordType
      Keyword     string
      PageNum     int
      PageSize    int
   }
)
@@ -130,6 +130,11 @@
   if total != 0 {
      return nil
   }
   records := []*Severity{}
   records := []*Severity{
      {1, "轻"},
      {2, "严重"},
      {3, "较严重"},
      {4, "特严重"},
   }
   return slf.CreateBatch(records)
}