diff options
| author | Vladislav Tupikin <MrRefactoring@yandex.ru> | 2026-04-19 22:24:24 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-19 22:24:24 +0300 |
| commit | 7466916e0206d55826d74f37c251bb5e40182c00 (patch) | |
| tree | 2c887558c71f34b76e541c7bf7d57a420ed3c9ed /database/model/model.go | |
| parent | 96b568b8389fd5a3ce228d5fb82ec9742d145b15 (diff) | |
Add custom geosite/geoip URL sources (#3980)
* feat: add custom geosite/geoip URL sources
Register DB model, panel API, index/xray UI, and i18n.
* fix
Diffstat (limited to 'database/model/model.go')
| -rw-r--r-- | database/model/model.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/database/model/model.go b/database/model/model.go index 6225df52..63f4a1b4 100644 --- a/database/model/model.go +++ b/database/model/model.go @@ -104,6 +104,18 @@ type Setting struct { Value string `json:"value" form:"value"` } +type CustomGeoResource struct { + Id int `json:"id" gorm:"primaryKey;autoIncrement"` + Type string `json:"type" gorm:"not null;uniqueIndex:idx_custom_geo_type_alias;column:geo_type"` + Alias string `json:"alias" gorm:"not null;uniqueIndex:idx_custom_geo_type_alias"` + Url string `json:"url" gorm:"not null"` + LocalPath string `json:"localPath" gorm:"column:local_path"` + LastUpdatedAt int64 `json:"lastUpdatedAt" gorm:"default:0;column:last_updated_at"` + LastModified string `json:"lastModified" gorm:"column:last_modified"` + CreatedAt int64 `json:"createdAt" gorm:"autoCreateTime;column:created_at"` + UpdatedAt int64 `json:"updatedAt" gorm:"autoUpdateTime;column:updated_at"` +} + // Client represents a client configuration for Xray inbounds with traffic limits and settings. type Client struct { ID string `json:"id"` // Unique client identifier |
