AI实验室后端

This commit is contained in:
BBIT-Kai
2026-02-04 13:58:18 +08:00
parent f9536dd0b4
commit 646e312a4c
24 changed files with 962 additions and 86 deletions
+11
View File
@@ -0,0 +1,11 @@
from typing import Optional
from pydantic import BaseModel
class LotteryCreateReq(BaseModel):
name: str
sort: int
oss: Optional[str] = None
is_opened: bool = False
remark: Optional[str] = None
+12
View File
@@ -0,0 +1,12 @@
from typing import Optional
from pydantic import BaseModel
class LotteryUpdateReq(BaseModel):
id: str # 必传,用来指定要更新哪条记录
name: Optional[str] = None
sort: Optional[int] = None
oss: Optional[str] = None
is_opened: Optional[bool] = None
remark: Optional[str] = None
+3
View File
@@ -103,5 +103,8 @@ class MqttTopic:
def is_status(self) -> bool:
return self.domain == "status" and self.resource == "info"
def is_response(self) -> bool:
return self.domain == "receipt"
def is_cmd(self) -> bool:
return self.domain == "cmd"