You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 line
3.3KB

  1. package domain
  2. import (
  3. "encoding/json"
  4. "time"
  5. )
  6. type Template struct {
  7. ID int64 `json:"id"`
  8. Name string `json:"name"`
  9. Description string `json:"description"`
  10. Locale string `json:"locale"`
  11. ThumbnailURL string `json:"thumbnailUrl"`
  12. TemplatePreviewURL string `json:"templatePreviewUrl"`
  13. Type string `json:"type"`
  14. PaletteReady bool `json:"paletteReady"`
  15. RawJSON json.RawMessage `json:"rawTemplateJson"`
  16. IsAITemplate bool `json:"isAiTemplate"`
  17. IsOnboarded bool `json:"isOnboarded"`
  18. ManifestStatus string `json:"manifestStatus"`
  19. LastDiscoveredAt *time.Time `json:"lastDiscoveredAt,omitempty"`
  20. }
  21. type TemplateManifest struct {
  22. ID string `json:"id"`
  23. TemplateID int64 `json:"templateId"`
  24. Version int `json:"version"`
  25. Source string `json:"source"`
  26. LanguageUsedDiscovery string `json:"languageUsedForDiscovery"`
  27. DiscoveryPayloadJSON json.RawMessage `json:"discoveryPayloadJson"`
  28. DiscoveryResponseJSON json.RawMessage `json:"discoveryResponseJson"`
  29. FlattenedManifestJSON json.RawMessage `json:"flattenedManifestJson"`
  30. IsActive bool `json:"isActive"`
  31. CreatedAt time.Time `json:"createdAt"`
  32. UpdatedAt time.Time `json:"updatedAt"`
  33. }
  34. type TemplateField struct {
  35. ID string `json:"id"`
  36. TemplateID int64 `json:"templateId"`
  37. ManifestID string `json:"manifestId"`
  38. Section string `json:"section"`
  39. KeyName string `json:"keyName"`
  40. Path string `json:"path"`
  41. FieldKind string `json:"fieldKind"`
  42. SampleValue string `json:"sampleValue"`
  43. IsEnabled bool `json:"isEnabled"`
  44. IsRequiredByUs bool `json:"isRequiredByUs"`
  45. DisplayLabel string `json:"displayLabel"`
  46. DisplayOrder int `json:"displayOrder"`
  47. Notes string `json:"notes"`
  48. }
  49. type SiteBuild struct {
  50. ID string `json:"id"`
  51. TemplateID int64 `json:"templateId"`
  52. ManifestID string `json:"manifestId"`
  53. RequestName string `json:"requestName"`
  54. GlobalDataJSON json.RawMessage `json:"globalDataJson"`
  55. AIDataJSON json.RawMessage `json:"aiDataJson"`
  56. FinalSitesPayload json.RawMessage `json:"finalSitesPayloadJson"`
  57. QCJobID *int64 `json:"qcJobId,omitempty"`
  58. QCSiteID *int64 `json:"qcSiteId,omitempty"`
  59. QCStatus string `json:"qcStatus"`
  60. QCPreviewURL string `json:"qcPreviewUrl"`
  61. QCEditorURL string `json:"qcEditorUrl"`
  62. QCResultJSON json.RawMessage `json:"qcResultJson"`
  63. QCErrorJSON json.RawMessage `json:"qcErrorJson"`
  64. StartedAt *time.Time `json:"startedAt,omitempty"`
  65. FinishedAt *time.Time `json:"finishedAt,omitempty"`
  66. }
  67. type AppSettings struct {
  68. QCBaseURL string `json:"qcBaseUrl"`
  69. QCBearerTokenEncrypted string `json:"qcBearerTokenEncrypted"`
  70. LanguageOutputMode string `json:"languageOutputMode"`
  71. JobPollIntervalSeconds int `json:"jobPollIntervalSeconds"`
  72. JobPollTimeoutSeconds int `json:"jobPollTimeoutSeconds"`
  73. }