apply.go 848 B

123456789101112131415161718192021222324252627282930313233343536
  1. package model
  2. //Apply apply model
  3. type Apply struct {
  4. ID int64 `json:"id" gorm:"AUTO_INCREMENT;primary_key;" form:"id"`
  5. Path string `json:"path"`
  6. From string `json:"from" form:"from"`
  7. To string `json:"to" form:"to"`
  8. Status int32 `json:"status" form:"status"`
  9. StartTime string `json:"start_time" form:"start_time"`
  10. EndTime string `json:"end_time" form:"end_time"`
  11. Active int32 `json:"active"`
  12. }
  13. //const definition
  14. const (
  15. ApplyValid = 1 // active=1 有效
  16. ApplyInvalid = -1 // active=-1 无效
  17. )
  18. // QueryApplyResponse response model
  19. type QueryApplyResponse struct {
  20. ApplyList []*Apply `json:"apply_list"`
  21. Pagination
  22. }
  23. // QueryApplyRequest request model
  24. type QueryApplyRequest struct {
  25. Apply
  26. Pagination
  27. }
  28. // TableName get table name model
  29. func (w Apply) TableName() string {
  30. return "apply"
  31. }