16 lines
351 B
Python
16 lines
351 B
Python
from dataclasses import dataclass
|
|
from datetime import datetime
|
|
|
|
|
|
@dataclass
|
|
class TargetVelocity:
|
|
vin: str
|
|
target_velocity: float
|
|
timestamp: datetime
|
|
|
|
def to_dict(self):
|
|
return {'vin': self.vin,
|
|
'target_velocity': self.target_velocity,
|
|
'timestamp': self.timestamp.timestamp()
|
|
}
|