mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 16:59:25 +00:00
Add GUID. Closes #10
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import json
|
import json
|
||||||
|
import uuid
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
@@ -15,6 +16,8 @@ from core.utils import infer_mode_family_from_mode, infer_band_from_freq, infer_
|
|||||||
# Data class that defines a spot.
|
# Data class that defines a spot.
|
||||||
@dataclass
|
@dataclass
|
||||||
class Spot:
|
class Spot:
|
||||||
|
# Globally unique identifier for the spot
|
||||||
|
guid: str = str(uuid.uuid4())
|
||||||
# Callsign of the operator that has been spotted
|
# Callsign of the operator that has been spotted
|
||||||
dx_call: str = None
|
dx_call: str = None
|
||||||
# Callsign of the operator that has spotted them
|
# Callsign of the operator that has spotted them
|
||||||
|
|||||||
@@ -223,6 +223,10 @@ components:
|
|||||||
Spot:
|
Spot:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
guid:
|
||||||
|
type: string
|
||||||
|
description: Globally unique identifier to distinguish this spot from any others.
|
||||||
|
example: d8a3f1b6-cb73-464e-b717-54b7004aa04f
|
||||||
dx_call:
|
dx_call:
|
||||||
type: string
|
type: string
|
||||||
description: Callsign of the operator that has been spotted
|
description: Callsign of the operator that has been spotted
|
||||||
|
|||||||
Reference in New Issue
Block a user