-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
85 lines (69 loc) · 1.85 KB
/
models.py
File metadata and controls
85 lines (69 loc) · 1.85 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
from __future__ import annotations
from datetime import datetime
from decimal import Decimal
from pydantic import BaseModel
class AttackerResponse(BaseModel):
id: int
character_id: int | None
corporation_id: int | None
alliance_id: int | None
faction_id: int | None
ship_type_id: int | None
weapon_type_id: int | None
damage_done: int
final_blow: bool
security_status: float
class ItemResponse(BaseModel):
id: int
item_type_id: int
flag: int
quantity_destroyed: int
quantity_dropped: int
singleton: bool
items: list[ItemResponse] = []
class KillmailSummary(BaseModel):
killmail_id: int
killmail_time: datetime
solar_system_id: int
victim_ship_type_id: int
victim_character_id: int | None
victim_corporation_id: int | None
victim_alliance_id: int | None
zkb_total_value: Decimal
zkb_is_npc: bool
zkb_is_solo: bool
zkb_is_awox: bool
zkb_attacker_count: int
class KillmailDetail(KillmailSummary):
hash: str
sequence_id: int
war_id: int | None
moon_id: int | None
victim_faction_id: int | None
victim_damage_taken: int
victim_pos_x: float | None
victim_pos_y: float | None
victim_pos_z: float | None
zkb_location_id: int | None
zkb_fitted_value: Decimal
zkb_dropped_value: Decimal
zkb_destroyed_value: Decimal
zkb_points: int
zkb_labels: list[str]
zkb_href: str | None
uploaded_at: datetime
created_at: datetime
attackers: list[AttackerResponse]
items: list[ItemResponse]
class KillmailListResponse(BaseModel):
total: int
kills: list[KillmailSummary]
class StatsResponse(BaseModel):
total_kills: int
total_value: Decimal
kills_npc: int
kills_solo: int
kills_awox: int
top_ships: list[dict]
top_solar_systems: list[dict]
ItemResponse.model_rebuild()