spark-server/internal/module/square/entity/source.go
2026-09-29 10:22:28 +08:00

19 lines
341 B
Go

package entity
// Source is square_posts.source.
type Source int16
const (
SourceUser Source = 0
SourceBotRSS Source = 1
)
func (s Source) Valid() bool {
return s == SourceUser || s == SourceBotRSS
}
// IsBot reports whether the post was published by the media bot worker.
func (s Source) IsBot() bool {
return s == SourceBotRSS
}