Como adicionar campos personalizados aos modelos

written this code but it is still not working can you tell the issue

<script type="text/discourse-plugin" version="0.8">
  const { getOwner } = require("discourse-common/lib/get-owner");
  const { htmlSafe } = require("@ember/string");

  api.decorateWidget("category-heading:after", (helper) => {
    const category = helper.attrs.category;

    if (category.custom_fields?.location) {
      const customLocation = htmlSafe(category.custom_fields.location);
      const template = getOwner(helper).lookup("template:components/category-header");

      return template.fragment.build("custom-location", { customLocation });
    }
  });
</script>

<script type="text/x-handlebars" data-template-name="components/category-header/custom-location">
  <div class="category-custom-location">{{customLocation}}</div>
</script>