mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2025-07-27 12:10:57 +00:00
feat: 统一双引号
This commit is contained in:
@ -6,36 +6,36 @@ from liteyuki.utils.data import LiteModel, Database as DB
|
||||
|
||||
DATA_PATH = "data/liteyuki"
|
||||
|
||||
user_db = DB(os.path.join(DATA_PATH, 'users.ldb'))
|
||||
group_db = DB(os.path.join(DATA_PATH, 'groups.ldb'))
|
||||
plugin_db = DB(os.path.join(DATA_PATH, 'plugins.ldb'))
|
||||
common_db = DB(os.path.join(DATA_PATH, 'common.ldb'))
|
||||
user_db = DB(os.path.join(DATA_PATH, "users.ldb"))
|
||||
group_db = DB(os.path.join(DATA_PATH, "groups.ldb"))
|
||||
plugin_db = DB(os.path.join(DATA_PATH, "plugins.ldb"))
|
||||
common_db = DB(os.path.join(DATA_PATH, "common.ldb"))
|
||||
|
||||
|
||||
class User(LiteModel):
|
||||
user_id: str = Field(str(), alias='user_id')
|
||||
username: str = Field(str(), alias='username')
|
||||
profile: dict[str, str] = Field(dict(), alias='profile')
|
||||
enabled_plugins: list[str] = Field(list(), alias='enabled_plugins')
|
||||
disabled_plugins: list[str] = Field(list(), alias='disabled_plugins')
|
||||
user_id: str = Field(str(), alias="user_id")
|
||||
username: str = Field(str(), alias="username")
|
||||
profile: dict[str, str] = Field(dict(), alias="profile")
|
||||
enabled_plugins: list[str] = Field(list(), alias="enabled_plugins")
|
||||
disabled_plugins: list[str] = Field(list(), alias="disabled_plugins")
|
||||
|
||||
|
||||
class GroupChat(LiteModel):
|
||||
# Group是一个关键字,所以这里用GroupChat
|
||||
group_id: str = Field(str(), alias='group_id')
|
||||
group_name: str = Field(str(), alias='group_name')
|
||||
enabled_plugins: list[str] = Field([], alias='enabled_plugins')
|
||||
disabled_plugins: list[str] = Field([], alias='disabled_plugins')
|
||||
group_id: str = Field(str(), alias="group_id")
|
||||
group_name: str = Field(str(), alias="group_name")
|
||||
enabled_plugins: list[str] = Field([], alias="enabled_plugins")
|
||||
disabled_plugins: list[str] = Field([], alias="disabled_plugins")
|
||||
|
||||
|
||||
class InstalledPlugin(LiteModel):
|
||||
module_name: str = Field(str(), alias='module_name')
|
||||
version: str = Field(str(), alias='version')
|
||||
module_name: str = Field(str(), alias="module_name")
|
||||
version: str = Field(str(), alias="version")
|
||||
|
||||
|
||||
class GlobalPlugin(LiteModel):
|
||||
module_name: str = Field(str(), alias='module_name')
|
||||
enabled: bool = Field(True, alias='enabled')
|
||||
module_name: str = Field(str(), alias="module_name")
|
||||
enabled: bool = Field(True, alias="enabled")
|
||||
|
||||
|
||||
def auto_migrate():
|
||||
|
Reference in New Issue
Block a user