Files
orbit/platform/model/subscription.go

23 lines
812 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package model
import (
core "git.yuntuo.hk/k2safe/orbit/model"
)
// Subscription 表示事件订阅配置,绑定授权凭据及过滤规则。
// 对应表 orbit_subscriptions;这是服务端持久化模型,不直接作为 API 响应。
type Subscription struct {
// Record 包含命名空间、记录标识、并发版本和 UTC 时间。
core.Record
// Name 可读名称,唯一性范围由对应数据表约束。
Name string `db:"name"`
// CredentialID 关联的命名空间凭据标识。
CredentialID core.ID `db:"credential_id"`
// Filter 订阅过滤规则的 JSON 文档。
Filter core.JSON `db:"filter"`
// Enabled 是否启用;关闭后拒绝相应的新接入或新操作。
Enabled bool `db:"enabled"`
}
func (Subscription) TableName() string { return "orbit_subscriptions" }