app_template.go 617 B

1234567891011121314151617181920212223
  1. package models
  2. import (
  3. "github.com/google/uuid"
  4. "gorm.io/gorm"
  5. )
  6. // AppTemplate represents a partial spec of a porter app that hydrates the first revision of an app
  7. type AppTemplate 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. // ProjectID is the ID of the project that the template belongs to.
  14. ProjectID int `json:"project_id"`
  15. // PorterAppID is the ID of the PorterApp that the template belongs to.
  16. PorterAppID int `json:"porter_app_id"`
  17. }