SELECT * FROM (
SELECT * FROM doctrine_migration_versions ORDER BY execution_time ASC LIMIT 3
) r ORDER BY r.execution_time DESC;
class PaymentType
{
private const CASH = 1;
private const NON_CASH = 2;
private int $type;
private function __construct(int $type)
{
$this->type = $type;
}
public static function cash(): self
{
return new self(self::CASH);
}
public static function nonCash(): self
{
return new self(self::NON_CASH);
}
public function isCash(): bool
{
return $this->type === self::CASH;
}
public function isNonCash(): bool
{
return $this->type === self::NON_CASH;
}
}
Чем такая запись может быть образована в python и как она схематически выглядит?