2024-06-19 19:29:46 +08:00
|
|
|
package model
|
|
|
|
|
|
|
|
type Station interface {
|
|
|
|
RtssModel
|
|
|
|
IsCentralized() bool
|
|
|
|
}
|
|
|
|
|
2024-06-24 18:20:11 +08:00
|
|
|
var _ Station = (*StationImpl)(nil)
|
|
|
|
|
2024-06-19 19:29:46 +08:00
|
|
|
type StationImpl struct {
|
|
|
|
uid string
|
|
|
|
centralized bool
|
|
|
|
}
|
|
|
|
|
2024-06-26 19:00:01 +08:00
|
|
|
func NewStation(uid string, centralized bool) *StationImpl {
|
2024-06-19 19:29:46 +08:00
|
|
|
return &StationImpl{
|
|
|
|
uid: uid,
|
|
|
|
centralized: centralized,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *StationImpl) Uid() string {
|
|
|
|
return s.uid
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *StationImpl) IsCentralized() bool {
|
|
|
|
return s.centralized
|
|
|
|
}
|