public static function bootSummable()
    {
        static::created(function ($model) {
            $sumCache = new SumCache($model);
            $sumCache->apply(function ($config) use ($model, $sumCache) {
                $sumCache->updateCacheRecord($config, '+', $model->{$config['columnToSum']}, $model->{$config['foreignKey']});
            });
        });

        static::updated(function ($model) {
            (new SumCache($model))->update();
        });

        static::deleted(function ($model) {
            $sumCache = new SumCache($model);
            $sumCache->apply(function ($config) use ($model, $sumCache) {
                $sumCache->updateCacheRecord($config, '-', $model->{$config['columnToSum']}, $model->{$config['foreignKey']});
            });
        });
    }