service_man/api/domain/entity.py

12 lines
248 B
Python
Raw Normal View History

from dataclasses import dataclass
from typing import Generic, TypeVar
from api.domain.value_obj import DomainValueObject
EntityId = TypeVar("EntityId", bound=DomainValueObject)
@dataclass
class DomainEntity(Generic[EntityId]):
id: EntityId