| | |
| | | // FaultType 故障类别 |
| | | FaultType 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"` |
| | | } |
| | | |
| | | // FaultTypeSearch 故障类别搜索条件 |
| | | FaultTypeSearch struct { |
| | | FaultType |
| | | Orm *gorm.DB |
| | | QueryClass constvar.FaultTypeQueryClass |
| | | KeywordType constvar.FaultTypeKeywordType |
| | | Keyword string |
| | | PageNum int |
| | | PageSize int |
| | | Orm *gorm.DB |
| | | QueryClass constvar.FaultTypeQueryClass |
| | | KeywordType constvar.FaultTypeKeywordType |
| | | Keyword string |
| | | PageNum int |
| | | PageSize int |
| | | } |
| | | ) |
| | | |
| | |
| | | if total != 0 { |
| | | return nil |
| | | } |
| | | records := []*FaultType{} |
| | | records := []*FaultType{ |
| | | {1, "设备安装"}, |
| | | {2, "设备调教"}, |
| | | {3, "设备升级"}, |
| | | {4, "电气故障"}, |
| | | {5, "设备故障"}, |
| | | {6, "设备良品率低"}, |
| | | } |
| | | return slf.CreateBatch(records) |
| | | } |