Files
databasus/backend/internal/features/healthcheck/attempt/model.go
2025-12-25 21:26:53 +03:00

20 lines
677 B
Go

package healthcheck_attempt
import (
"databasus-backend/internal/features/databases"
"time"
"github.com/google/uuid"
)
type HealthcheckAttempt struct {
ID uuid.UUID `json:"id" gorm:"column:id;primaryKey;type:uuid;default:gen_random_uuid()"`
DatabaseID uuid.UUID `json:"databaseId" gorm:"column:database_id;type:uuid;not null"`
Status databases.HealthStatus `json:"status" gorm:"column:status;type:text;not null"`
CreatedAt time.Time `json:"createdAt" gorm:"column:created_at;type:timestamp with time zone;not null"`
}
func (h *HealthcheckAttempt) TableName() string {
return "healthcheck_attempts"
}