public function attachToModel(Model $model, $type = '', $locale = null): Model
    {
        if ($model->assets()->get()->contains($this)) {
            throw AssetUploadException::create();
        }

        $model->assets->where('pivot.type', $type)->where('pivot.locale', $locale);

        $locale = $locale ?? config('app.locale');

        $model->assets()->attach($this, ['type' => $type, 'locale' => $locale, 'order' => $this->order]);

        return $model->load('assets');
    }