feat: wire delivery result and infra data backends
This commit is contained in:
@@ -87,23 +87,44 @@ type ResourceUsage struct {
|
||||
ReleasedAt *time.Time `json:"released_at,omitempty"`
|
||||
}
|
||||
|
||||
type MySQLInstance struct {
|
||||
type DeploymentResult struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
TaskID string `gorm:"size:36;not null;uniqueIndex" json:"task_id"`
|
||||
BusinessLineID uint64 `gorm:"not null;index" json:"business_line_id"`
|
||||
TargetID uint64 `gorm:"not null;index;uniqueIndex:idx_mysql_target_name,priority:1" json:"target_id"`
|
||||
Namespace string `gorm:"size:63;not null" json:"namespace"`
|
||||
Name string `gorm:"size:63;not null;uniqueIndex:idx_mysql_target_name,priority:2" json:"name"`
|
||||
NodeName string `gorm:"size:128" json:"node_name"`
|
||||
Host string `gorm:"size:255;not null" json:"host"`
|
||||
Port int `gorm:"not null;default:3306" json:"port"`
|
||||
Version string `gorm:"size:32;not null" json:"version"`
|
||||
Component string `gorm:"size:32;not null;index" json:"component"`
|
||||
ServiceType string `gorm:"size:32;not null;index" json:"service_type"`
|
||||
InstanceName string `gorm:"size:128;not null;index" json:"instance_name"`
|
||||
Namespace string `gorm:"size:128;not null;default:'';index" json:"namespace"`
|
||||
TargetID uint64 `gorm:"not null;index" json:"target_id"`
|
||||
NodeName string `gorm:"size:128;not null;default:''" json:"node_name"`
|
||||
Host string `gorm:"size:255;not null;default:''" json:"host"`
|
||||
Port int `gorm:"not null;default:0" json:"port"`
|
||||
Version string `gorm:"size:64;not null;default:''" json:"version"`
|
||||
Status string `gorm:"size:32;not null;index" json:"status"`
|
||||
CloudDMID string `gorm:"size:128" json:"clouddm_id,omitempty"`
|
||||
Metadata string `gorm:"type:json" json:"metadata"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
type DeploymentCredential struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
TaskID string `gorm:"size:36;not null;index" json:"task_id"`
|
||||
DeploymentResultID uint64 `gorm:"not null;default:0;index" json:"deployment_result_id"`
|
||||
BusinessLineID uint64 `gorm:"not null;index" json:"business_line_id"`
|
||||
Component string `gorm:"size:32;not null;index" json:"component"`
|
||||
InstanceName string `gorm:"size:128;not null;index" json:"instance_name"`
|
||||
Username string `gorm:"size:128;not null" json:"username"`
|
||||
AccountHost string `gorm:"size:128;not null;default:''" json:"account_host"`
|
||||
Ciphertext string `gorm:"type:text;not null" json:"-"`
|
||||
Nonce string `gorm:"size:64;not null" json:"-"`
|
||||
Status string `gorm:"size:32;not null;index" json:"status"`
|
||||
Source string `gorm:"size:64;not null;default:'user_input'" json:"source"`
|
||||
ViewedBy uint64 `gorm:"not null;default:0" json:"viewed_by"`
|
||||
ViewedAt *time.Time `json:"viewed_at,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
type ExecutionJob struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
TaskID string `gorm:"size:36;not null;uniqueIndex" json:"task_id"`
|
||||
|
||||
Reference in New Issue
Block a user