Files
worker/app/models/region.go
Gleb Tv 2c884c5612
Некоторые проверки не удались
CI / test (push) Successful in 2m5s
Docker / Build and publish worker image (push) Failing after 31s
refactor: adopt worker module path
2026-07-13 17:56:12 +03:00

21 строка
755 B
Go

package models
import (
"rocketgit.ru/rsmon/worker/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
}