app/assets/dev_api_plugin_model.md.-ZrDVhyd.js

2 lines
7.6 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{_ as a,c as t,o as e,a9 as r}from"./chunks/framework.C4_mTacX.js";const g=JSON.parse('{"title":"liteyuki.plugin.model","description":"","frontmatter":{"title":"liteyuki.plugin.model"},"headers":[],"relativePath":"dev/api/plugin/model.md","filePath":"zh/dev/api/plugin/model.md","lastUpdated":null}'),o={name:"dev/api/plugin/model.md"},s=r('<h1 id="模块-liteyuki-plugin-model" tabindex="-1"><strong>模块</strong> <code>liteyuki.plugin.model</code> <a class="header-anchor" href="#模块-liteyuki-plugin-model" aria-label="Permalink to &quot;**模块** `liteyuki.plugin.model`&quot;"></a></h1><p>Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/7/24 上午12:02 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : model.py @Software: PyCharm</p><h3 id="class-plugintype-enum" tabindex="-1"><em><strong>class</strong></em> <code>PluginType(Enum)</code> <a class="header-anchor" href="#class-plugintype-enum" aria-label="Permalink to &quot;***class*** `PluginType(Enum)`&quot;"></a></h3><h4 id="attr-application-application" tabindex="-1"><em><strong>attr</strong></em> <code>APPLICATION = &#39;application&#39;</code> <a class="header-anchor" href="#attr-application-application" aria-label="Permalink to &quot;***attr*** `APPLICATION = &#39;application&#39;`&quot;"></a></h4><h4 id="attr-service-service" tabindex="-1"><em><strong>attr</strong></em> <code>SERVICE = &#39;service&#39;</code> <a class="header-anchor" href="#attr-service-service" aria-label="Permalink to &quot;***attr*** `SERVICE = &#39;service&#39;`&quot;"></a></h4><h4 id="attr-module-module" tabindex="-1"><em><strong>attr</strong></em> <code>MODULE = &#39;module&#39;</code> <a class="header-anchor" href="#attr-module-module" aria-label="Permalink to &quot;***attr*** `MODULE = &#39;module&#39;`&quot;"></a></h4><h4 id="attr-unclassified-unclassified" tabindex="-1"><em><strong>attr</strong></em> <code>UNCLASSIFIED = &#39;unclassified&#39;</code> <a class="header-anchor" href="#attr-unclassified-unclassified" aria-label="Permalink to &quot;***attr*** `UNCLASSIFIED = &#39;unclassified&#39;`&quot;"></a></h4><h4 id="attr-test-test" tabindex="-1"><em><strong>attr</strong></em> <code>TEST = &#39;test&#39;</code> <a class="header-anchor" href="#attr-test-test" aria-label="Permalink to &quot;***attr*** `TEST = &#39;test&#39;`&quot;"></a></h4><h3 id="class-pluginmetadata-basemodel" tabindex="-1"><em><strong>class</strong></em> <code>PluginMetadata(BaseModel)</code> <a class="header-anchor" href="#class-pluginmetadata-basemodel" aria-label="Permalink to &quot;***class*** `PluginMetadata(BaseModel)`&quot;"></a></h3><h4 id="attr-name-str-no-default" tabindex="-1"><em><strong>attr</strong></em> <code>name: str = NO_DEFAULT</code> <a class="header-anchor" href="#attr-name-str-no-default" aria-label="Permalink to &quot;***attr*** `name: str = NO_DEFAULT`&quot;"></a></h4><h4 id="attr-description-str" tabindex="-1"><em><strong>attr</strong></em> <code>description: str = &#39;&#39;</code> <a class="header-anchor" href="#attr-description-str" aria-label="Permalink to &quot;***attr*** `description: str = &#39;&#39;`&quot;"></a></h4><h4 id="attr-usage-str" tabindex="-1"><em><strong>attr</strong></em> <code>usage: str = &#39;&#39;</code> <a class="header-anchor" href="#attr-usage-str" aria-label="Permalink to &quot;***attr*** `usage: str = &#39;&#39;`&quot;"></a></h4><h4 id="attr-type-plugintype-plugintype-unclassified" tabindex="-1"><em><strong>attr</strong></em> <code>type: PluginType = PluginType.UNCLASSIFIED</code> <a class="header-anchor" href="#attr-type-plugintype-plugintype-unclassified" aria-label="Permalink to &quot;***attr*** `type: PluginType = PluginType.UNCLASSIFIED`&quot;"></a></h4><h4 id="attr-author-str" tabindex="-1"><em><strong>attr</strong></em> <code>author: str = &#39;&#39;</code> <a class="header-anchor" href="#attr-author-str" aria-label="Permalink to &quot;***attr*** `author: str = &#39;&#39;`&quot;"></a></h4><h4 id="attr-homepage-str" tabindex="-1"><em><strong>attr</strong></em> <code>homepage: str = &#39;&#39;</code> <a class="header-anchor" href="#attr-homepage-str" aria-label="Permalink to &quot;***attr*** `homepage: str = &#39;&#39;`&quot;"></a></h4><h4 id="attr-extra-dict-str-any" tabindex="-1"><em><strong>attr</strong></em> <code>extra: dict[str, Any] = {}</code> <a class="header-anchor" href="#attr-extra-dict-str-any" aria-label="Permalink to &quot;***attr*** `extra: dict[str, Any] = {}`&quot;"></a></h4><h3 id="class-plugin-basemodel" tabindex="-1"><em><strong>class</strong></em> <code>Plugin(BaseModel)</code> <a class="header-anchor" href="#class-plugin-basemodel" aria-label="Permalink to &quot;***class*** `Plugin(BaseModel)`&quot;"></a></h3><h4 id="func-hash-self" tabindex="-1"><em><strong>func</strong></em> <code>__hash__(self)</code> <a class="header-anchor" href="#func-hash-self" aria-label="Permalink to &quot;***func*** `__hash__(self)`&quot;"></a></h4><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/plugin/model.py#L83" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __hash__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self):</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> hash</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.module_name)</span></span></code></pre></div></details><h4 id="attr-model-config-arbitrary-types-allowed-true" tabindex="-1"><em><strong>attr</strong></em> <code>model_config = {&#39;arbitrary_types_allowed&#39;: True}</code> <a class="header-anchor" href="#attr-model-config-arbitrary-types-allowed-true" aria-label="Permalink to &quot;***attr*** `model_config = {&#39;arbitrary_types_allowed&#39;: True}`&quot;"></a></h4><h4 id="attr-name-str-no-default-1" tabindex="-1"><em><strong>attr</strong></em> <code>name: str = NO_DEFAULT</code> <a class="header-anchor" href="#attr-name-str-no-default-1" aria-label="Permalink to &quot;***attr*** `name: str = NO_DEFAULT`&quot;"></a></h4><h4 id="attr-module-moduletype-no-default" tabindex="-1"><em><strong>attr</strong></em> <code>module: ModuleType = NO_DEFAULT</code> <a class="header-anchor" href="#attr-module-moduletype-no-default" aria-label="Permalink to &quot;***attr*** `module: ModuleType = NO_DEFAULT`&quot;"></a></h4><h4 id="attr-module-name-str-no-default" tabindex="-1"><em><strong>attr</strong></em> <code>module_name: str = NO_DEFAULT</code> <a class="header-anchor" href="#attr-module-name-str-no-default" aria-label="Permalink to &quot;***attr*** `module_name: str = NO_DEFAULT`&quot;"></a></h4><h4 id="attr-metadata-optional-pluginmetadata-none" tabindex="-1"><em><strong>attr</strong></em> <code>metadata: Optional[PluginMetadata] = None</code> <a class="header-anchor" href="#attr-metadata-optional-pluginmetadata-none" aria-label="Permalink to &quot;***attr*** `metadata: Optional[PluginMetadata] = None`&quot;"></a></h4>',25),i=[s];function l(n,d,h,c,u,m){return e(),t("div",null,i)}const k=a(o,[["render",l]]);export{g as __pageData,k as default};