package config

import "time"

type Services struct {
	MessageService         MessageServiceConfig         `yaml:"messageService"`
	MessageServiceBackCall MessageServiceBackCallConfig `yaml:"messageServiceBackcall"`
	NotifyService          NotifyServiceConfig          `yaml:"notifyService"`
}

type Chat struct {
	ChatTag string `yaml:"chatTag" validate:"required"`
	ChatId  string `yaml:"chatId" validate:"required"`
}

type ChatsInClient struct {
	ClientKey string `yaml:"clientKey" validate:"required"`
	Chats     []Chat `yaml:"chats"`
}

type MessageServiceConfig struct {
	EnableTwilio bool            `yaml:"enableTwilio" default:"false"`
	ChatList     []ChatsInClient `yaml:"chatList"`
}

type MessageServiceBackCallConfig struct {
	CallUrl                 string        `yaml:"callUrl" validate:"required"`
	PollMessageReadInterval time.Duration `yaml:"pollMessageReadInterval" default:"10s"`
}

type NotifyServiceConfig struct {
	NotifyChatID    string `yaml:"notifyChatID" validate:"required"`
	NotifyClientKey string `yaml:"notifyClientKey" validate:"required"`
}
