build.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package model
  2. import "go-common/library/time"
  3. //Build build.
  4. type Build struct {
  5. ID int64 `json:"id"`
  6. AppID int64 `json:"app_id"`
  7. Name string `json:"name"`
  8. TagID int64 `json:"tag_id"`
  9. Mark string `json:"mark"`
  10. Operator string `json:"operator"`
  11. Ctime time.Time `json:"ctime"`
  12. Mtime time.Time `json:"mtime"`
  13. }
  14. // TableName build.
  15. func (Build) TableName() string {
  16. return "build"
  17. }
  18. //CreateBuildReq ...
  19. type CreateBuildReq struct {
  20. AppName string `form:"app_name" validate:"required"`
  21. Env string `form:"env" validate:"required"`
  22. Zone string `form:"zone" validate:"required"`
  23. Name string `form:"name" validate:"required"`
  24. TagID int64 `form:"tag_id" validate:"required"`
  25. TreeID int64 `form:"tree_id" validate:"required"`
  26. }
  27. //BuildsReq ...
  28. type BuildsReq struct {
  29. AppName string `form:"app_name" validate:"required"`
  30. Env string `form:"env" validate:"required"`
  31. Zone string `form:"zone" validate:"required"`
  32. TreeID int64 `form:"tree_id" validate:"required"`
  33. }
  34. //BuildReq ...
  35. type BuildReq struct {
  36. BuildID int64 `form:"build_id" validate:"required"`
  37. }