chore: 领域模型 & DTO
This commit is contained in:
6
interval/model/message.go
Normal file
6
interval/model/message.go
Normal file
@ -0,0 +1,6 @@
|
||||
package model
|
||||
|
||||
type Message struct {
|
||||
Topic Topic
|
||||
Content []byte
|
||||
}
|
||||
6
interval/model/subscription.go
Normal file
6
interval/model/subscription.go
Normal file
@ -0,0 +1,6 @@
|
||||
package model
|
||||
|
||||
type Subscription struct {
|
||||
Topic Topic
|
||||
ClientID string
|
||||
}
|
||||
7
interval/model/topic.go
Normal file
7
interval/model/topic.go
Normal file
@ -0,0 +1,7 @@
|
||||
package model
|
||||
|
||||
type Topic string
|
||||
|
||||
func (t Topic) Valid() bool {
|
||||
return t != ""
|
||||
}
|
||||
Reference in New Issue
Block a user