add first commit

This commit is contained in:
2026-07-21 15:43:39 +08:00
commit 482f8df508
19 changed files with 521 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
# src/plugins/example/models/counter.py
from pydantic import BaseModel
import modelvault
class Counter(BaseModel):
# 主键字段
__modelvault_primary_key__ = "name"
# 唯一索引
__modelvault_indexes__ = [
modelvault.models.unique("name"),
]
name: str # 计数器名称(例如 "visits")
value: int = 0