mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-16 12:02:16 +00:00
22 lines
513 B
Python
22 lines
513 B
Python
from datetime import datetime, timedelta
|
|
|
|
from pydantic import BaseModel
|
|
from simnet.models.starrail.self_help import StarRailSelfHelpActionLog
|
|
|
|
|
|
class ActionLogPair(BaseModel):
|
|
start: StarRailSelfHelpActionLog
|
|
end: StarRailSelfHelpActionLog
|
|
|
|
@property
|
|
def start_time(self) -> datetime:
|
|
return self.start.time
|
|
|
|
@property
|
|
def end_time(self) -> datetime:
|
|
return self.end.time
|
|
|
|
@property
|
|
def duration(self) -> timedelta:
|
|
return self.end.time - self.start.time
|