from abc import ABC, abstractmethod
from dataclasses import dataclass, field
import scipy.constants as spc


@dataclass
class Body(ABC):
    mass: float
    radius: float
    phi_infty: float = field(default_factory=lambda: spc.c**2)
    G: float = field(default_factory=lambda: spc.G)

    def phi_l(self, G=spc.G):
        return spc.G * self.mass / self.radius
