53 lines
861 B
Python
53 lines
861 B
Python
from pydantic import BaseModel
|
|
|
|
|
|
class User(BaseModel):
|
|
id: int
|
|
login: str
|
|
full_name: str = ""
|
|
email: str = ""
|
|
|
|
|
|
class Repo(BaseModel):
|
|
id: int
|
|
name: str
|
|
full_name: str
|
|
description: str = ""
|
|
url: str
|
|
updated_at: str = ""
|
|
|
|
|
|
class Issue(BaseModel):
|
|
id: int
|
|
number: int
|
|
title: str
|
|
state: str
|
|
labels: list[str] = []
|
|
assignees: list[str] = []
|
|
url: str
|
|
|
|
|
|
class PullRequest(BaseModel):
|
|
id: int
|
|
number: int
|
|
title: str
|
|
state: str
|
|
user: str
|
|
url: str
|
|
|
|
|
|
class SuggestionDelta(BaseModel):
|
|
panel: str
|
|
action: str
|
|
target: str = ""
|
|
priority: str = "medium"
|
|
|
|
|
|
class ViewContext(BaseModel):
|
|
user: User
|
|
repos: list[Repo] = []
|
|
issues: list[Issue] = []
|
|
pull_requests: list[PullRequest] = []
|
|
view: str = "dashboard"
|
|
deltas: list[SuggestionDelta] = []
|