22 lines
346 B
Go
22 lines
346 B
Go
package dingtalk
|
|
|
|
import "ai_scheduler/internal/data/model"
|
|
|
|
type Bot struct {
|
|
id int
|
|
botConfig *model.AiBotConfig
|
|
}
|
|
type BotOption func(*Bot)
|
|
|
|
func WithId(id int) BotOption {
|
|
return func(b *Bot) {
|
|
b.id = id
|
|
}
|
|
}
|
|
|
|
func WithBootConfig(BotConfig *model.AiBotConfig) BotOption {
|
|
return func(bot *Bot) {
|
|
bot.botConfig = BotConfig
|
|
}
|
|
}
|