comment.go 731 B

123456789101112131415161718192021222324
  1. package model
  2. import "time"
  3. //Comment model for performance test job comment
  4. type Comment struct {
  5. ID int `json:"id" gorm:"AUTO_INCREMENT;primary_key;" form:"id"`
  6. ReportID int `json:"report_id" form:"report_id"`
  7. Content string `json:"content" gorm:"content"`
  8. UserName string `json:"user_name" form:"user_name" gorm:"user_name"`
  9. Status int `json:"status" form:"status"`
  10. SubmitDate time.Time `json:"submit_date"`
  11. }
  12. //QueryCommentResponse model for QueryCommentResponse
  13. type QueryCommentResponse struct {
  14. Total int `json:"total"`
  15. Comments []*Comment `json:"comment_list"`
  16. }
  17. //TableName db table name of Comment
  18. func (w Comment) TableName() string {
  19. return "comment"
  20. }