# `Diffo.Provider.BaseOrganization`
[🔗](https://github.com/diffo-dev/diffo/blob/v0.9.0/lib/diffo/provider/components/base_organization.ex#L5)

Ash Resource Fragment for TMF632 Organization — a Party representing a group
of people identified by shared interests or purpose (business, department,
enterprise).

Compose with `BaseParty` on a concrete leaf to get the TMF632 Organization
attribute set, TMF camelCase jason wire shape, and organization-shaped
outstanding signature.

`Diffo.Provider.Organization` uses this fragment directly as the
out-of-the-box TMF Organization resource. Domain extenders compose the same
two fragments on their own leaf for richer domain identity:

    defmodule MyApp.Carrier do
      use Ash.Resource,
        fragments: [Diffo.Provider.BaseParty, Diffo.Provider.BaseOrganization],
        domain: MyApp.Domain

      attributes do
        attribute :carrier_code, :string, public?: true
      end

      actions do
        create :build do
          accept [:id, :href, :name, :trading_name, :organization_type, :carrier_code]
          change set_attribute(:type, :Organization)
        end
      end
    end

## Attributes

All organization attributes are permissive (`allow_nil? true`) — tighten on
your derived leaf if your domain requires e.g. an organization_type.

- `trading_name` — name the organization trades under.
- `name_type` — type of the name (Co, Inc, Ltd, etc.).
- `organization_type` — type of organization (company, department, …).
- `is_legal_entity` — boolean; true when the organization is a legal entity
  known by a national referential.
- `is_head_office` — boolean; true when this is the head office.

Deferred from this fragment (TMF632 v5 fields landing in follow-up tickets):

- `existsDuring` (TimePeriod), `status` (OrganizationStateType — pairs with
  Specification state-machine work)
- `otherName[]`, `organizationIdentification[]` (nested resources)
- `organizationChildRelationship[]` / `organizationParentRelationship` (modeled
  via the existing PartyRef machinery)

## Wire shape (TMF632)

`jason.pick` selects base + organization fields and renames to TMF camelCase
(`tradingName`, `nameType`, `organizationType`, `isLegalEntity`,
`isHeadOffice`).

# `extensions`

# `opts`

# `persisted`

# `spark_dsl_config`

# `validate_sections`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
