config.py 999 B

123456789101112131415161718192021222324252627
  1. # This Python file uses the following encoding: utf-8
  2. # @author runhey
  3. # github https://github.com/runhey
  4. from pydantic import BaseModel, Field
  5. from enum import Enum
  6. from datetime import timedelta
  7. from pydantic import BaseModel, Field
  8. from enum import Enum
  9. from tasks.Component.config_scheduler import Scheduler
  10. from tasks.Component.config_base import ConfigBase, Time
  11. class ScrollNumber(str, Enum):
  12. ONE = "卷一"
  13. TWO = "卷二"
  14. THREE = "卷三"
  15. FOUR = "卷四"
  16. FIVE = "卷五"
  17. SIX = "卷六"
  18. class MemoryScrollsConfig(ConfigBase):
  19. scroll_number: ScrollNumber = Field(default=ScrollNumber.ONE, description='scroll_number_help')
  20. auto_close_exploration: bool = Field(default=False, description='指定绘卷结束后,自动关闭探索任务,避免长时间无意义执行')
  21. class MemoryScrolls(ConfigBase):
  22. scheduler: Scheduler = Field(default_factory=Scheduler)
  23. memory_scrolls_config: MemoryScrollsConfig = Field(default_factory=MemoryScrollsConfig)