feat: switch base delivery to awx task logs

This commit is contained in:
mac
2026-07-23 18:36:24 +08:00
parent c2a3bbbdc0
commit a934380c9c
20 changed files with 1638 additions and 1243 deletions
-12
View File
@@ -16,18 +16,6 @@ const (
TaskCanceled = "canceled"
)
type DeploymentTarget struct {
ID uint64 `gorm:"primaryKey" json:"id"`
Name string `gorm:"size:128;not null;uniqueIndex" json:"name"`
TargetType string `gorm:"size:32;not null;index" json:"target_type"`
AWXInventoryID uint64 `gorm:"not null" json:"awx_inventory_id"`
AWXTemplateID uint64 `gorm:"not null" json:"awx_template_id"`
Enabled bool `gorm:"not null;default:true;index" json:"enabled"`
Metadata string `gorm:"type:json" json:"metadata"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type ResourceQuota struct {
ID uint64 `gorm:"primaryKey" json:"id"`
BusinessLineID uint64 `gorm:"not null;uniqueIndex:idx_resource_quota_scope,priority:1" json:"business_line_id"`
-28
View File
@@ -80,34 +80,6 @@ type WayneToken struct {
UpdatedAt time.Time `json:"updated_at"`
}
type Deployment struct {
ID uint64 `gorm:"primaryKey" json:"id"`
DeploymentID string `gorm:"size:64;not null;uniqueIndex" json:"deployment_id"`
Component string `gorm:"size:64;not null;index" json:"component"`
BusinessLineID uint64 `gorm:"not null;index" json:"business_line_id"`
BusinessLine string `gorm:"size:128;not null;default:''" json:"business_line"`
Status string `gorm:"size:32;not null;index" json:"status"`
RequestPayload string `gorm:"type:longtext" json:"request_payload"`
ResultPayload string `gorm:"type:longtext" json:"result_payload"`
CreatedBy uint64 `gorm:"not null;index" json:"created_by"`
CreatedByName string `gorm:"size:128;not null;default:''" json:"created_by_name"`
StartedAt *time.Time `json:"started_at"`
FinishedAt *time.Time `json:"finished_at"`
CreatedAt time.Time `gorm:"index" json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type DeploymentEvent struct {
ID uint64 `gorm:"primaryKey" json:"id"`
DeploymentID string `gorm:"size:64;not null;index:idx_deployment_events_deployment_seq,priority:1" json:"deployment_id"`
Seq uint64 `gorm:"not null;index:idx_deployment_events_deployment_seq,priority:2" json:"seq"`
Type string `gorm:"size:32;not null;index" json:"type"`
Level string `gorm:"size:32;not null;default:''" json:"level"`
Message string `gorm:"type:longtext" json:"message"`
Payload string `gorm:"type:longtext" json:"payload"`
CreatedAt time.Time `gorm:"index" json:"created_at"`
}
type AuditLog struct {
ID uint64 `gorm:"primaryKey" json:"id"`
RequestID string `gorm:"size:128;not null;default:''" json:"request_id"`