-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmodels.py
More file actions
38 lines (28 loc) · 669 Bytes
/
models.py
File metadata and controls
38 lines (28 loc) · 669 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env python3
"""
@Author: King
@Date: 2023-01-04 21:24:24
@Email: linsy_king@sjtu.edu.cn
"""
from pydantic import BaseModel, Field
from typing import Union
"""
Models
"""
class Position(BaseModel):
left: int = Field(..., description="Left position")
top: int = Field(..., description="Top position")
width: int = Field(..., description="Width")
height: int = Field(..., description="Height")
class Check(BaseModel):
type: int
class Course(BaseModel):
id: int
name: str
type: str
maxshow: int = -1
order: str = "normal"
msg: str = ""
class URL(BaseModel):
url: str
browser: Union[str, None] = None