app_revision.go 993 B

1234567891011121314151617181920212223242526272829303132
  1. package models
  2. import (
  3. "github.com/google/uuid"
  4. "gorm.io/gorm"
  5. )
  6. // AppRevision represents the full spec for a revision of a porter app
  7. type AppRevision struct {
  8. gorm.Model
  9. // ID is a UUID for the AppRevision
  10. ID uuid.UUID `gorm:"type:uuid;primaryKey" json:"id"`
  11. // Base64App is the PorterApp as json encoded in base64
  12. Base64App string `json:"base64_app"`
  13. // Status is the status of the apply that happened for this revision.
  14. Status string `json:"status"`
  15. // DeploymentTargetID is the ID of the deployment target that the revision applies to.
  16. DeploymentTargetID uuid.UUID `json:"deployment_target_id"`
  17. // ProjectID is the ID of the project that the revision belongs to.
  18. ProjectID int `json:"project_id"`
  19. // PorterAppID is the ID of the PorterApp that the revision belongs to.
  20. PorterAppID int `json:"porter_app_id"`
  21. // RevisionNumber is the number of the revision respective to that porter_app_id and deployment_target_id
  22. RevisionNumber int `json:"revision_number"`
  23. }