feat: publish standalone worker
Separate worker packaging and service lifecycle from the control plane.
Этот коммит содержится в:
32
app/models/domain.go
Обычный файл
32
app/models/domain.go
Обычный файл
@@ -0,0 +1,32 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"rsgit.ru/rsmon/rsmon/app/models/concerns"
|
||||
)
|
||||
|
||||
// Domain represents a customer-facing DNS name. The shape mirrors
|
||||
// rstuff's `domains` table — see docs/parity/rstuff-inventory.md §2
|
||||
// and docs/plans/inventory-management.md §4.
|
||||
//
|
||||
// Distinct from RknDomain (the RKN blocklist cache, see
|
||||
// app/models/rkn_domain.go): RknDomain is read-only data about
|
||||
// blocked domains; Domain is the customer-side name→site/server
|
||||
// pointer that monitoring reasons about.
|
||||
type Domain struct {
|
||||
concerns.Model
|
||||
|
||||
AccountID int64 `gorm:"type:bigint REFERENCES accounts(id);not null;index" json:"account_id"`
|
||||
Account *Account `json:"-"`
|
||||
ServerID *int64 `gorm:"type:bigint REFERENCES servers(id) ON DELETE SET NULL;index" json:"server_id,omitempty"`
|
||||
Server *Server `json:"-"`
|
||||
SiteID *int64 `gorm:"type:bigint REFERENCES sites(id) ON DELETE SET NULL;index" json:"site_id,omitempty"`
|
||||
Site *Site `json:"site,omitempty"`
|
||||
Name string `gorm:"size:255;not null" json:"name"`
|
||||
Env string `gorm:"size:32;not null;default:'production'" json:"env"`
|
||||
IsActive bool `gorm:"not null;default:true" json:"is_active"`
|
||||
|
||||
concerns.Timestamped
|
||||
}
|
||||
|
||||
// TableName provides functionality.
|
||||
func (Domain) TableName() string { return "domains" }
|
||||
Ссылка в новой задаче
Block a user