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

task_cloud.go 1.6 kB

1234567891011121314151617181920212223242526272829303132333435
  1. package cloud
  2. import (
  3. "gitlink.org.cn/JointCloud/pcm-coordinator/pkg/models/base"
  4. "time"
  5. )
  6. type ResourceSpec struct {
  7. CPU string `json:"cpu"` // 对应 JSON 中的 "cpu" 字段
  8. Memory string `json:"memory"` // 对应 JSON 中的 "memory" 字段
  9. }
  10. type TaskCloudModel struct {
  11. Id int64 `json:"id" gorm:"primarykey;not null;comment:id"`
  12. Name string `json:"name" gorm:"null;comment:名称"`
  13. TaskId int64 `json:"taskId" gorm:"not null;comment:task表id"`
  14. AdapterId int64 `json:"adapterId" gorm:"not null;comment:适配器id"`
  15. AdapterName string `json:"adapterName" gorm:"not null;comment:适配器名称"`
  16. ClusterId string `json:"clusterId" gorm:"not null;comment:集群id"`
  17. ClusterName string `json:"clusterName" gorm:"not null;comment:集群名称"`
  18. Kind string `json:"kind" gorm:"comment:种类"`
  19. Status string `json:"status" gorm:"comment:状态"`
  20. StartTime *time.Time `json:"startTime,string" gorm:"comment:开始时间"`
  21. YamlString string `json:"yamlString" gorm:"not null;comment:入参"`
  22. Result string `json:"result" gorm:"comment:运行结果"`
  23. Namespace string `json:"namespace" gorm:"comment:命名空间"`
  24. UserId int64 `json:"userId" gorm:"comment:用户id"`
  25. BusinessCode string `json:"businessCode" gorm:"comment:业务码"`
  26. ResourceSpec ResourceSpec `json:"resourceSpec" gorm:"serializer:json"`
  27. base.BaseModel
  28. }
  29. func (TaskCloudModel) TableName() string {
  30. return "task_cloud"
  31. }

PCM is positioned as Software stack over Cloud, aiming to build the standards and ecology of heterogeneous cloud collaboration for JCC in a non intrusive and autonomous peer-to-peer manner.