@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 ServiceOrder <<Pivot>> {
    cancellationDate : DateTime
    cancellationReason : String
    category : String
    completionDate : DateTime
    description : String
    expectedCompletionDate : DateTime
    externalId : String
    href : String
    id : String
    notificationContact : String
    orderDate : DateTime
    priority : String
    requestedCompletionDate : DateTime
    requestedStartDate : DateTime
    startDate : DateTime
    state : ServiceOrderStateType
    @baseType : String
    @schemaLocation : Uri
    @type : String
}

class Note  {
    author : String
    date : DateTime
    id : String
    text : String
    @baseType : String
    @schemaLocation : Uri
    @type : String
}

class ServiceOrderItem  {
    action : OrderItemActionType
    id : String [1]
    quantity : Integer
    state : ServiceOrderItemStateType
    @baseType : String
    @schemaLocation : Uri
    @type : String
}

class ServiceOrderItemRelationship  {
    relationshipType : String
    @baseType : String
    @schemaLocation : Uri
    @type : String
}

class ServiceOrderItemRef  {
    itemId : String
    serviceOrderHref : Uri
    serviceOrderId : String
    @baseType : String
    @referredType : String
    @schemaLocation : Uri
    @type : String
}

class ServiceRefOrValue  {
    category : String
    description : String
    endDate : DateTime
    hasStarted : Boolean
    href : String
    id : String
    isBundle : Boolean
    isServiceEnabled : Boolean
    isStateful : Boolean
    name : String
    serviceDate : String
    serviceType : String
    startDate : DateTime
    startMode : String
    state : ServiceStateType
    @baseType : String
    @referredType : String
    @schemaLocation : Uri
    @type : String
}

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

class RelatedServiceOrderItem  {
    href : Uri
    id : String
    itemAction : OrderItemActionType
    itemId : String
    role : String
    serviceOrderHref : String
    serviceOrderId : String
    @baseType : String
    @referredType : String
    @schemaLocation : Uri
    @type : String
}

class OrderItemActionType <<Enumeration>> {
    add
    modify
    delete
    noChange
}

class ServiceRelationship  <<Ref>> {
    href : Uri
    id : String
    relationshipType : String [1]
    @baseType : 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 Feature  {
    id : String
    isBundle : Boolean
    isEnabled : Boolean
    name : String [1]
}

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

class FeatureRelationship  {
    id : String
    name : String [1]
    relationshipType : String [1]
    validFor : TimePeriod
}

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

class ServiceStateType <<Enumeration>> {
    feasibilityChecked
    designed
    reserved
    inactive
    active
    terminated
}

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

class ServiceSpecificationRef  <<Ref>> {
    href : Uri
    id : String [1]
    name : String
    version : 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 AppointmentRef  <<Ref>> {
    description : String
    href : String
    id : String [1]
    @baseType : String
    @referredType : String
    @schemaLocation : Uri
    @type : String
}

class ServiceOrderItemStateType <<Enumeration>> {
    acknowledged
    rejected
    pending
    held
    inProgress
    cancelled
    completed
    failed
    assessingCancellation
    pendingCancellation
    partial
}

class ServiceOrderStateType <<Enumeration>> {
    acknowledged
    rejected
    pending
    held
    inProgress
    cancelled
    completed
    failed
    partial
    assessingCancellation
    pendingCancellation
}

class ServiceOrderJeopardyAlert  {
    alertDate : DateTime
    exception : String
    id : String
    jeopardyType : String
    message : String
    name : String
    @baseType : String
    @schemaLocation : Uri
    @type : String
}

class ServiceOrderErrorMessage  {
    code : Integer
    message : String
    reason : String
    referenceError : Uri
    @baseType : String
    @schemaLocation : Uri
    @type : String
}

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

class ServiceOrderMilestone  {
    description : String
    id : String
    message : String
    milestoneDate : DateTime
    name : String
    status : String
    @baseType : String
    @schemaLocation : Uri
    @type : String
}

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

ServiceOrder *-->  "0..*" Note : note

ServiceOrder *-->  "0..*" RelatedParty : relatedParty

ServiceOrder *-->  "0..1" ServiceOrderErrorMessage : errorMessage

ServiceOrder *-->  "0..*" ServiceOrderJeopardyAlert : jeopardyAlert

ServiceOrder *-->  "0..*" ServiceOrderMilestone : milestone

ServiceOrder -right[hidden]-> ServiceOrderStateType

ServiceOrder *-->  "0..*" ServiceOrderItem : serviceOrderItem

ServiceOrderItem *-right-> "0..*" ServiceOrderItem : serviceOrderItem

Note "0..*" <--* ServiceRefOrValue : note

ServiceOrderItem *-->  "0..1" ServiceRefOrValue : service

ServiceOrderItem -right[hidden]-> ServiceOrderItemStateType

ServiceOrderItemStateType -right[hidden]-> OrderItemActionType

ServiceRefOrValue *-right-> "0..*" ServiceRefOrValue : supportingService

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

ServiceRefOrValue *-->  "0..*" ServiceRelationship : serviceRelationship

ServiceRefOrValue -right[hidden]-> ServiceStateType

ServiceRefOrValue *-->  "0..*" Characteristic : serviceCharacteristic

ServiceRefOrValue *-->  "0..*" Feature : feature

ServiceRelationship *-right-> "0..*" Characteristic : serviceRelationshipCharacteristic

ServiceRefOrValue "0..1" <--* ServiceRelationship : service

Characteristic "1..*" <-left-* Feature : featureCharacteristic

ServiceOrderJeopardyAlert <-left[hidden]- ServiceOrderItemStateType

ServiceOrderItem "0..*" <-left-* ServiceOrderJeopardyAlert : serviceOrderItem

ServiceOrderErrorMessage <-left[hidden]- ServiceOrderItemStateType

ServiceOrderItem "0..*" <-left-* ServiceOrderErrorMessage : serviceOrderItem

ServiceOrderMilestone <-left[hidden]- ServiceOrderItemStateType

ServiceOrderItem "0..*" <-left-* ServiceOrderMilestone : serviceOrderItem

RelatedPlaceRefOrValue "0..*" <--* ServiceRefOrValue : place

RelatedEntityRefOrValue "0..*" <--* ServiceRefOrValue : relatedEntity

ServiceRefOrValue *-->  "0..*" RelatedServiceOrderItem : serviceOrderItem

ServiceRefOrValue *-->  "0..*" ResourceRef : supportingResource

ServiceRefOrValue *-->  "0..1" ServiceSpecificationRef : serviceSpecification

ServiceOrderRelationship "0..*" <-left-* ServiceOrder : orderRelationship

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

ServiceOrderItem *-->  "0..1" AppointmentRef : appointment

ServiceOrderItem *-->  "0..*" ServiceOrderItemRelationship : serviceOrderItemRelationship

Feature *-->  "0..*" FeatureRelationship : featureRelationship

Feature *-->  "0..*" ConstraintRef : constraint

ServiceOrderItemRelationship *-->  "0..1" ServiceOrderItemRef : orderItem

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

ServiceOrderJeopardyAlert <-left[hidden]- ServiceOrderItemStateType

ServiceOrderErrorMessage <-left[hidden]- ServiceOrderItemStateType

ServiceOrderMilestone <-left[hidden]- ServiceOrderItemStateType

@enduml