apm.go 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. package model
  2. import (
  3. xtime "go-common/library/time"
  4. )
  5. // TableName case tablename.
  6. func (*ServiceName) TableName() string {
  7. return "service_name"
  8. }
  9. // ServiceName service name.
  10. type ServiceName struct {
  11. ID int `gorm:"column:id" json:"id"`
  12. Name string `gorm:"column:name" json:"name"`
  13. Remark string `gorm:"column:remark" json:"remark"`
  14. Token string `gorm:"column:token" json:"token"`
  15. ConfigID string `gorm:"column:config_id" json:"config_id"`
  16. ProjectTeamID string `gorm:"column:project_team_id" json:"project_team_id"`
  17. Environment int8 `gorm:"column:environment" json:"environment"`
  18. Public string `gorm:"column:public" json:"public"`
  19. CTime xtime.Time `gorm:"column:ctime" json:"ctime"`
  20. MTime xtime.Time `gorm:"column:mtime" json:"mtime"`
  21. }
  22. // TableName case tablename.
  23. func (*ServiceConfig) TableName() string {
  24. return "service_config"
  25. }
  26. // ServiceConfig service config.
  27. type ServiceConfig struct {
  28. ID int `gorm:"column:id" json:"id"`
  29. ServiceID int `gorm:"column:service_id" json:"service_id"`
  30. Suffix string `gorm:"column:suffix" json:"suffix"`
  31. Config string `gorm:"column:config" json:"config"`
  32. State int8 `gorm:"column:state" json:"state"`
  33. Operator string `gorm:"column:operator" json:"operator"`
  34. Remark string `gorm:"column:remark" json:"remark"`
  35. CTime xtime.Time `gorm:"column:ctime" json:"ctime"`
  36. MTime xtime.Time `gorm:"column:mtime" json:"mtime"`
  37. }
  38. // TableName case tablename.
  39. func (*ServiceConfigValue) TableName() string {
  40. return "service_config_value"
  41. }
  42. // ServiceConfigValue service config value.
  43. type ServiceConfigValue struct {
  44. ID int `gorm:"column:id" json:"id"`
  45. ConfigID int `gorm:"column:config_id" json:"config_id"`
  46. Name string `gorm:"column:name" json:"name"`
  47. Config string `gorm:"column:config" json:"config"`
  48. State int8 `gorm:"column:state" json:"state"`
  49. Operator string `gorm:"column:operator" json:"operator"`
  50. NamespaceID int `gorm:"column:namespace_id" json:"namespace_id"`
  51. CTime xtime.Time `gorm:"column:ctime" json:"ctime"`
  52. MTime xtime.Time `gorm:"column:mtime" json:"mtime"`
  53. }
  54. // TableName case tablename.
  55. func (*BuildVersion) TableName() string {
  56. return "build_version"
  57. }
  58. // BuildVersion build version.
  59. type BuildVersion struct {
  60. ID int `gorm:"column:id" json:"id"`
  61. ServiceID int `gorm:"column:service_id" json:"service_id"`
  62. Version string `gorm:"column:version" json:"version"`
  63. Remark string `gorm:"column:remark" json:"remark"`
  64. State int8 `gorm:"column:state" json:"state"`
  65. ConfigID int `gorm:"column:config_id" json:"config_id"`
  66. CTime xtime.Time `gorm:"column:ctime" json:"ctime"`
  67. MTime xtime.Time `gorm:"column:mtime" json:"mtime"`
  68. }
  69. //ApmCopyReq ...
  70. type ApmCopyReq struct {
  71. Name string `form:"name" validate:"required"`
  72. TreeID int64 `form:"tree_id" validate:"required"`
  73. ApmName string `form:"apmname" validate:"required"`
  74. }