task.go 1.4 KB

123456789101112131415161718192021222324
  1. package model
  2. type Task struct {
  3. ID string `gorm:"type:varchar(128);not null;" json:"id"`
  4. Title string `gorm:"type:varchar(50);not null" json:"title"`
  5. State int `gorm:"type:int(11);not null" json:"state"`
  6. Description string `gorm:"type:longtext;not null" json:"description"`
  7. StateFile string `gorm:"column:statement_file;type:longtext;not null" json:"stateFile"`
  8. CaseFile string `gorm:"column:case_file;type:longtext;" json:"caseFile"`
  9. CaseAll int `gorm:"column:case_all;type:int(11)" json:"caseAll"`
  10. CaseNotExecute int `gorm:"column:case_not_execute;type:int(11)" json:"caseNotExecute"`
  11. CaseSuccess int `gorm:"column:case_success;type:int(11)" json:"caseSuccess"`
  12. CaseFail int `gorm:"column:case_fail;type:int(11)" json:"caseFail"`
  13. CreatedAt Time `json:"created_at" gorm:"column:create_time;type:datetime default CURRENT_TIMESTAMP"`
  14. UpdatedAt Time `json:"updated_at" gorm:"column:update_time;type:datetime default CURRENT_TIMESTAMP"`
  15. Delete int `gorm:"type:tinyint(1);not null" json:"delete"`
  16. PlanId string `gorm:"type:varchar(128);not null" json:"planId"`
  17. ExecutorId string `gorm:"type:varchar(128);not null" json:"executorId"`
  18. CompanyId int `json:"company_id" gorm:"column:company_id;type:bigint(20)"`
  19. }
  20. func (Task) TableName() string {
  21. return "task"
  22. }