Common: Move AgentID definition to common
This commit is contained in:
parent
31f3c1a4d6
commit
80cd5a05a1
|
@ -1,4 +1,7 @@
|
||||||
|
from uuid import UUID
|
||||||
|
|
||||||
from pydantic import PositiveInt
|
from pydantic import PositiveInt
|
||||||
from typing_extensions import TypeAlias
|
from typing_extensions import TypeAlias
|
||||||
|
|
||||||
|
AgentID: TypeAlias = UUID
|
||||||
HardwareID: TypeAlias = PositiveInt
|
HardwareID: TypeAlias = PositiveInt
|
||||||
|
|
|
@ -12,4 +12,5 @@ from .user_credentials import UserCredentials
|
||||||
from .machine import Machine, MachineID
|
from .machine import Machine, MachineID
|
||||||
from .communication_type import CommunicationType
|
from .communication_type import CommunicationType
|
||||||
from .node import Node
|
from .node import Node
|
||||||
from .agent import Agent, AgentID
|
from common.types import AgentID
|
||||||
|
from .agent import Agent
|
||||||
|
|
|
@ -1,15 +1,11 @@
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from uuid import UUID
|
|
||||||
|
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
from typing_extensions import TypeAlias
|
|
||||||
|
|
||||||
from common.base_models import MutableInfectionMonkeyBaseModel
|
from common.base_models import MutableInfectionMonkeyBaseModel
|
||||||
|
|
||||||
from . import MachineID
|
from . import AgentID, MachineID
|
||||||
|
|
||||||
AgentID: TypeAlias = UUID
|
|
||||||
|
|
||||||
|
|
||||||
class Agent(MutableInfectionMonkeyBaseModel):
|
class Agent(MutableInfectionMonkeyBaseModel):
|
||||||
|
|
Loading…
Reference in New Issue