From e4ffbcfb34f56d4ba3330f3e85912a8af30a322c Mon Sep 17 00:00:00 2001
From: Kyomotoi <0w0@imki.moe>
Date: Thu, 13 Oct 2022 16:09:38 +0800
Subject: =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=E9=87=8D=E6=9E=84=20config=20?=
 =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E9=A1=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ATRI/configs/models.py | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 ATRI/configs/models.py

(limited to 'ATRI/configs/models.py')

diff --git a/ATRI/configs/models.py b/ATRI/configs/models.py
new file mode 100644
index 0000000..8043f8a
--- /dev/null
+++ b/ATRI/configs/models.py
@@ -0,0 +1,60 @@
+from typing import List
+from pydantic import BaseModel
+
+
+class BotConfig(BaseModel):
+    host: str
+    port: int
+    debug: bool
+    superusers: set
+    nickname: set
+    command_start: set
+    command_sep: set
+    session_expire_timeout: int
+    access_token: str
+    proxy: str
+    request_timeout: int
+
+
+class GoCQHTTPAccountList(BaseModel):
+    uin: int
+    password: str
+    protocol: int
+
+
+class WithGoCQHTTP(BaseModel):
+    enabled: bool
+    accounts: List[GoCQHTTPAccountList]
+    download_domain: str
+    download_version: str
+
+
+class SauceNAO(BaseModel):
+    key: str
+
+
+class Setu(BaseModel):
+    reverse_proxy: bool
+    reverse_proxy_domain: str
+
+
+class ConfigModel(BaseModel):
+    ConfigVersion: str
+    BotConfig: BotConfig
+    WithGoCQHTTP: WithGoCQHTTP
+    SauceNAO: SauceNAO
+    Setu: Setu
+
+
+class RuntimeConfig(BaseModel):
+    host: str
+    port: int
+    debug: bool
+    superusers: set
+    nickname: set
+    command_start: set
+    command_sep: set
+    session_expire_timeout: int
+    gocq_accoutns: list
+    gocq_download_domain: str
+    gocq_version: str
-- 
cgit v1.2.3