@startuml
hide circle
hide methods
hide stereotype
show <<Enumeration>> stereotype
skinparam class {
   BackgroundColor<<Enumeration>> #E6F5F7
   BackgroundColor<<Ref>> #FFFFE0
   BackgroundColor<<Pivot>> #FFFFFFF
   BackgroundColor<<SimpleType>> #E2F0DA
   BackgroundColor #FCF2E3
}

class Organization <<Pivot>> {
    existsDuring : TimePeriod
    href : Uri
    id : String
    isHeadOffice : Boolean
    isLegalEntity : Boolean
    name : String
    nameType : String
    organizationType : String
    status : OrganizationStateType
    tradingName : String
    @baseType : String
    @schemaLocation : Uri
    @type : String
}

class TaxExemptionCertificate  {
    certificateNumber : String
    id : String
    issuingJurisdiction : String
    reason : String
    validFor : TimePeriod
    @baseType : String
    @schemaLocation : Uri
    @type : String
}

class TaxDefinition  {
    id : String
    jurisdictionLevel : String
    jurisdictionName : String
    name : String
    taxType : String
    validFor : TimePeriod
    @baseType : String
    @schemaLocation : Uri
    @type : String
}

class AttachmentRefOrValue  {
    attachmentType : String
    content : string/base64
    description : String
    href : Uri
    id : String
    mimeType : String
    name : String
    size : Quantity
    url : Uri
    validFor : TimePeriod
    @baseType : String
    @referredType : String
    @schemaLocation : Uri
    @type : String
}

class Characteristic  {
    id : String
    name : String [1]
    value : Any [1]
    valueType : String
    @baseType : String
    @schemaLocation : Uri
    @type : String
}

class CharacteristicRelationship  <<Ref>> {
    href : Uri
    id : String
    relationshipType : String
    @baseType : String
    @schemaLocation : Uri
    @type : String
}

class ContactMedium  {
    href : Uri
    id : String
    mediumType : String
    preferred : Boolean
    validFor : TimePeriod
    @baseType : String
    @schemaLocation : Uri
    @type : String
}

class MediumCharacteristic  {
    city : String
    contactType : String
    country : String
    emailAddress : String
    faxNumber : String
    href : Uri
    id : String
    phoneNumber : String
    postCode : String
    socialNetworkId : String
    stateOrProvince : String
    street1 : String
    street2 : String
    @baseType : String
    @schemaLocation : Uri
    @type : String
}

class OrganizationChildRelationship  <<Ref>> {
    href : Uri
    id : String
    relationshipType : String
    @baseType : String
    @schemaLocation : Uri
    @type : String
}

class OrganizationRef  <<Ref>> {
    href : Uri
    id : String [1]
    name : String
    @baseType : String
    @referredType : String
    @schemaLocation : Uri
    @type : String
}

class RelatedParty  {
    href : Uri
    id : String [1]
    name : String
    role : String
    @baseType : String
    @referredType : String [1]
    @schemaLocation : Uri
    @type : String
}

class ExternalReference  {
    externalReferenceType : String
    href : Uri
    id : String
    name : String
    @baseType : String
    @schemaLocation : Uri
    @type : String
}

class OtherNameOrganization  {
    href : Uri
    id : String
    name : String
    nameType : String
    tradingName : String
    validFor : TimePeriod
    @baseType : String
    @schemaLocation : Uri
    @type : String
}

class OrganizationIdentification  {
    href : Uri
    id : String
    identificationId : String
    identificationType : String
    issuingAuthority : String
    issuingDate : DateTime
    validFor : TimePeriod
    @baseType : String
    @schemaLocation : Uri
    @type : String
}

class PartyCreditProfile  {
    creditAgencyName : String
    creditAgencyType : String
    href : Uri
    id : String
    ratingReference : String
    ratingScore : Integer
    validFor : TimePeriod
    @baseType : String
    @schemaLocation : Uri
    @type : String
}

class OrganizationParentRelationship  <<Ref>> {
    href : Uri
    id : String
    relationshipType : String
    @baseType : String
    @schemaLocation : Uri
    @type : String
}

class OrganizationStateType <<Enumeration>> {
    initialized
    validated
    closed
}

Organization *-->  "0..*" OrganizationChildRelationship : organizationChildRelationship

Organization *-->  "0..*" OrganizationIdentification : organizationIdentification

Organization *-->  "0..1" OrganizationParentRelationship : organizationParentRelationship

Organization -right[hidden]-> OrganizationStateType

Organization *-->  "0..*" TaxExemptionCertificate : taxExemptionCertificate

OrganizationIdentification *-->  "0..1" AttachmentRefOrValue : attachment

TaxExemptionCertificate *-->  "0..1" AttachmentRefOrValue : attachment

OrganizationChildRelationship *-->  "0..1" OrganizationRef : organization

OrganizationParentRelationship *-->  "0..1" OrganizationRef : organization

OtherNameOrganization "0..*" <-left-* Organization : otherName

ContactMedium "0..*" <--* Organization : contactMedium

PartyCreditProfile "0..*" <--* Organization : creditRating

RelatedParty "0..*" <--* Organization : relatedParty

ExternalReference "0..*" <--* Organization : externalReference

Organization *-->  "0..*" Characteristic : partyCharacteristic

TaxExemptionCertificate *-->  "0..*" TaxDefinition : taxDefinition

Characteristic *-->  "0..*" CharacteristicRelationship : characteristicRelationship

ContactMedium *-right-> "0..1" MediumCharacteristic : characteristic

@enduml