Files
worker/app/models/region.go
Gleb Tv 2c7a0236da feat: publish standalone worker
Separate worker packaging and service lifecycle from the control plane.
2026-07-13 17:55:14 +03:00

21 строка
750 B
Go

package models
import (
"rsgit.ru/rsmon/rsmon/app/models/concerns"
)
// DefaultRegionCode is the historical default region code seeded by
// Migrate() (see app/models/migrate.go). Centralized here so admin
// endpoints and check_jobs.go agree on the literal.
const DefaultRegionCode = "local"
// Region represents a geographic region where distributed workers can run
type Region struct {
concerns.Model
Code string `gorm:"uniqueIndex;size:20;not null" json:"code"` // e.g. "ru-msk", "us-east", "eu-west"
Name string `gorm:"not null" json:"name"` // "Moscow, Russia"
Enabled bool `gorm:"not null;default:true" json:"enabled"`
Priority int `gorm:"not null;default:0" json:"priority"`
concerns.Timestamped
}