spark-server/internal/module/square/entity/source.go
DESKTOP-L8OUL9F\gfl0034 715ace7ac6 feat(square): 广场 Bot/RSS 发布与媒体校验
支持广场机器人发帖与媒体类型检查,并补充相关迁移与 i18n。
2026-09-24 23:07:06 +08:00

19 lines
343 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
}