File size: 1,807 Bytes
c1e5d84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from ctypes import Union
from typing import Optional
from pydantic import BaseModel, Field
import json

class ItemUploaded(BaseModel):
    union_id: str = Field(title="the user unionid of the item uploaded",examples=["oR_-n69II04mrTuFOFyqiAt_Wgbk"])
    item_fileurl: str = Field(title="the file url of the item uploaded",examples=["cloud://prod-3g52ms9o7a81f23c.7072-prod-3g52ms9o7a81f23c-1324125412/oR_-n69II04mrTuFOFyqiAt_Wgbk/202402022042282841.jpg"])
    item_mediatype: str = Field(title="the media type of the item uploaded",examples=["image"])
    upload_datetime: str = Field(title="the upload datetime of the item uploaded",examples=["2024-2-1 17:20:18"])

class ItemInHistory(BaseModel):
    history_id: str = Field(title="the unique id of the item in history",examples=["20240131003701985"])
    union_id: str = Field(title="the user unionid of the item in history",examples=["oR_-n69II04mrTuFOFyqiAt_Wgbk"])
    item_fileurl: str = Field(title="the file url of the item in history",examples=["cloud://prod-3g52ms9o7a81f23c.7072-prod-3g52ms9o7a81f23c-1324125412/oR_-n69II04mrTuFOFyqiAt_Wgbk/20240131003701985.jpg"])
    item_mediatype: str = Field(title="the media type of the item in history",examples=["image"])
    upload_datetime: str = Field(title="the upload datetime of the item in history",examples=["2024-2-1 17:20:18"])
    ai_feedback: str = Field(title="the ai feedback to the item in history",examples=["AZARAS SPINETAIL"])

class ServiceLoginInfo(BaseModel):
    appid: str = Field(title="appid of wx miniprogram",examples=[""])
    secret: str = Field(title="secret of wx miniprogram",examples=[""])
    js_code: str = Field(title="res.code return from wx.login()",examples=[""])
    grant_type: str = Field(title="grant_type = authorization_code",examples=["authorization_code"])