deployment.go 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package models
  2. import (
  3. "time"
  4. )
  5. type Deployment struct {
  6. ID string `json:"id"`
  7. ClientID string `json:"client_id"`
  8. ProviderID string `json:"provider_id"`
  9. TemplateID string `json:"template_id"`
  10. Status string `json:"status"` // Pending, Running, Failed, Terminated
  11. Region string `json:"region"`
  12. VPSID string `json:"vps_id"` // ID assigned by provider
  13. IPAddress string `json:"ip_address"`
  14. Configuration string `json:"configuration"` // JSON configuration
  15. CreatedAt time.Time `json:"created_at"`
  16. UpdatedAt time.Time `json:"updated_at"`
  17. DeployedAt time.Time `json:"deployed_at,omitempty"`
  18. TerminatedAt time.Time `json:"terminated_at,omitempty"`
  19. }
  20. type AutoDeployConfig struct {
  21. ID string `json:"id"`
  22. ProjectID string `json:"project_id"`
  23. Branch string `json:"branch"`
  24. Trigger string `json:"trigger"`
  25. Enabled bool `json:"enabled"`
  26. CreatedAt time.Time `json:"created_at"`
  27. UpdatedAt time.Time `json:"updated_at"`
  28. }
  29. type AutoDeployHistory struct {
  30. ID string `json:"id"`
  31. ProjectID string `json:"project_id"`
  32. Branch string `json:"branch"`
  33. Trigger string `json:"trigger"`
  34. Status string `json:"status"`
  35. CreatedAt time.Time `json:"created_at"`
  36. UpdatedAt time.Time `json:"updated_at"`
  37. }